You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug appears related to the change in #4489 . That change uses sys.path[1:] , but this means that the first element of the path is omitted. This causes import issues in panel preview when importing a file from the first element of the PYTHONPATH. Moreover, if I locally change to sys.path instead of sys.path[1:] in panel/io/jupyter_server_extension.py then it fixes the issue.
ALL software version info
panel=1.4.4=pyhd8ed1ab_0
python=3.11.9=h932a869_0_cpython
jupyterlab=4.2.3=pyhd8ed1ab_0
Tested on OSX and Linux.
Full software versions in repro here.
Description of expected behavior and the observed behavior
Thanks for the well described bug report. You could try to make the PR by just changing sys.path = [os.getcwd()] + sys.path[1:] to sys.path = [os.getcwd()] + sys.path.
As there is no test or documentation of the change in 4489, then Philipp would be the only one knowing why it was [1:] anyways and he would be able to quickly pick up and adjust your PR if needed.
This bug appears related to the change in #4489 . That change uses
sys.path[1:]
, but this means that the first element of the path is omitted. This causes import issues in panel preview when importing a file from the first element of the PYTHONPATH. Moreover, if I locally change tosys.path
instead ofsys.path[1:]
inpanel/io/jupyter_server_extension.py
then it fixes the issue.ALL software version info
panel=1.4.4=pyhd8ed1ab_0
python=3.11.9=h932a869_0_cpython
jupyterlab=4.2.3=pyhd8ed1ab_0
Tested on OSX and Linux.
Full software versions in repro here.
Description of expected behavior and the observed behavior
Full repro instructions at https://github.com/jordansamuels/panel-jupyter-path-bug-repro.
Expected: panel preview works in jupyter lab.
Observed: import exception.
Complete, minimal, self-contained example code that reproduces the issue
Full repro at https://github.com/jordansamuels/panel-jupyter-path-bug-repro.
Stack traceback and/or browser JavaScript console output
(none relevant that I could find)
Screenshots or screencasts of the bug in action
The text was updated successfully, but these errors were encountered: