ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
200 stars 38 forks source link

Relative Path Git root is not relative #42

Closed olivmarcel closed 4 years ago

olivmarcel commented 4 years ago

Describe the bug Relative path for git root is not relative

FileNotFoundError: [Errno 2] No such file or directory: '/home/jupyter-xxx/github-com-ideonate-cdsdashboards/./github-com-ideonate-cdsdashboards/examples/sample-source-code/plotlydash'

To Reproduce User guide example produces the error.

Configuration Using The Littlest JupyterHub

danlester commented 4 years ago

Thank you for reporting this. I can confirm I see this behavior in the latest versions on TLJH (but not other installations). I'll take a look.

danlester commented 4 years ago

I have released a new version cdsdashboards 0.3.5 which also needs a corresponding upgrade on the singleuser environment (for version 0.5.6 of jhsingle-native-proxy).

These enforce absolute paths in relevant places so we should not see the variation across different installations of JupyterHub.

Upgrade instructions are here: https://cdsdashboards.readthedocs.io/en/stable/chapters/upgrading.html

Thanks again for your help! Please let me know if there are any further problems.

olivmarcel commented 4 years ago

Hi, Giving it another try, the fix appears to have corrected the running command python3 -m plotlydash_tornado_cmd.main ./github-com-ideonate-cdsdashboards/examples/sample-source-code/plotlydash/plotlyapp.py --port=40081

But.. I'm still getting the FileNotFoundError FileNotFoundError: [Errno 2] No such file or directory: '/home/jupyter-xxx/github-com-ideonate-cdsdashboards/./github-com-ideonate-cdsdashboards/examples/sample-source-code/plotlydash'

danlester commented 4 years ago

@olivmarcel Thanks for trying this. Of course, there could be something else unanticipated in your environment, but it doesn't look like the user environment has the updated version of the jhsingle-native-proxy package (0.5.6).

It should now be passing the absolute path as follows:

python3 -m plotlydash_tornado_cmd.main /Users/dan/github-com-ideonate-cdsdashboards/examples/sample-source-code/plotlydash/plotlyapp.py --port=40081

The relevant upgrade instructions were:

sudo -E /opt/tljh/user/bin/python3 -m pip install cdsdashboards[user]==0.3.5

But maybe to force this upgrade or inspect the user pip environment try something like:

sudo -i
source /opt/tljh/user/bin/activate
python3 -m pip list
python3 -m pip install --upgrade jhsingle-native-proxy==0.5.6

If you hadn't already, please stop and delete the existing server from the JupyterHub home page, and then just click to edit the dashboard and Save it to restart it.

olivmarcel commented 4 years ago

Sorry my bad, got mixed up between hub and user envs. The fix worked indeed! Congrats for your work here, great functionnality! Olivier