Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deephaven server does not have the whole VS Code codebase #10

Open
chipkent opened this issue Jun 7, 2024 · 5 comments
Open

Deephaven server does not have the whole VS Code codebase #10

chipkent opened this issue Jun 7, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@chipkent
Copy link
Member

chipkent commented Jun 7, 2024

  1. create a module named mymod.py
print("IN MYMOD")

def myfunc(x):
    return x + 1
  1. In a script try to run:
import mymod

You will get an error:

14:19:52.953 ERROR r-Scheduler-Serial-1 | .c.ConsoleServiceGrpcImpl | Error running script: java.lang.RuntimeException: Error in Python interpreter:
Type: <class 'ModuleNotFoundError'>
Value: No module named 'mymod'
@chipkent chipkent added the bug Something isn't working label Jun 7, 2024
@mofojed mofojed added the triage label Jun 10, 2024
@bmingles
Copy link
Collaborator

@chipkent does this work for you in code studio? I get the same error there.

@bmingles
Copy link
Collaborator

bmingles commented Jun 13, 2024

@chipkent I figured out why it didn't work for me in code studio. I needed to add:

import sys
sys.path.append("/data/storage/notebooks")

In the extension, this also holds true with the additional requirement that the folder you are using has to be known to the DH server. I have mine mapped via volumes config in the docker compose file I run my server from.

In my case I map /local/path/to/my/dh/data/:/data

https://deephaven.io/core/docs/reference/community-questions/import-python-script/

@bmingles
Copy link
Collaborator

#16 to address this for Docker configs

@bmingles
Copy link
Collaborator

bmingles commented Jul 8, 2024

This seems to behave as expected, so closing the bug. I have created a documentation task #23 to provide instructions on how to configure this.

@bmingles bmingles closed this as completed Jul 8, 2024
@bmingles bmingles added the wontfix This will not be worked on label Jul 16, 2024
@bmingles
Copy link
Collaborator

bmingles commented Jul 23, 2024

Re-opening based on discussion with @chipkent . I'd like to investigate more of what the typical local Python experience would be in vscode and see what options we have to make the DH experience closer to that. Note that I re-classified this as an enhancement. It seems this can work by setting sys.path, but it's not the greatest user experience we'd expect for a vscode based solution. I'll investigate and then write a more thorough ticket with more intentional design of how this should actually work.

@bmingles bmingles reopened this Jul 23, 2024
@bmingles bmingles added enhancement New feature or request and removed wontfix This will not be worked on bug Something isn't working labels Jul 24, 2024
@bmingles bmingles self-assigned this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants