deephaven / vscode-deephaven

Deephaven Visual Studio Code Extension
Apache License 2.0
0 stars 0 forks source link

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

Open chipkent opened 3 weeks ago

chipkent commented 3 weeks ago
  1. create a module named mymod.py

print("IN MYMOD")

def myfunc(x): return x + 1

2. In a script try to run:
```python
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'
bmingles commented 2 weeks ago

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

bmingles commented 2 weeks ago

@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 commented 5 days ago

16 to address this for Docker configs