-
Notifications
You must be signed in to change notification settings - Fork 97
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
Importing geopandas
prevents panel
from rendering servable()
components
#2562
Comments
Hi @alaws-USGS, thanks for opening an issue. I'm curious if you've tried to reproduce this locally (not on Nebari). If you are able to reproduce locally, then it suggests the issue is not Nebari specific and the fix may need to be with panel or geopandas or one of the other dependencies. |
Hi @Adam-D-Lewis, I have deployed the same app locally and have not been able to replicate the same issue. I also perused both the |
Thank you @alaws-USGS. I have seen some problems with visualization libraries used on Nebari. More info is here. I was able to resolve by pinning several dependencies (ipympl, jupyterlab, jupyterlab_widgets, jupyterlab_server, jupyter_client, ipykernel) to match up with Nebari's jupyterlab image. Be aware that the versions pinned in that issue are no longer the correct versions in the latest version of Nebari. I'm not sure this is the solution to this issue, but would be the first thing I'd recommend to try. |
HI @Adam-D-Lewis, I read your suggestion for the fix and thank you for sharing that. I believe we are using a version of Nebari that matches one of those two so it should hopefully be seamless! I will also report back on what the results are. I want to echo what you said in your issue and say that this is not something a Nebari user should have to hunt down and manually adjust. I believe that it needs to be addressed in order to make Nebari production-ready. |
I agree it's not ideal. There are a few potential solutions I've learned about recently that I would like to test soon - #2261 (comment). |
You mentioned "Panel Preview" so I'm wondering if you are seeing this error when viewing through the Jupyter Notebook "Panel Preview" button? Does it render in a notebook cell? I have had issues with the Panel Preview button on Nebari. I never tracked down the issue - it was working for me at one point, then it stopped working on my project. I haven't gone back to test with other projects/environments yet. Also, I dont think this is related, but just in case - I've had some issues with cache when using Panel on Nebari that cause the render to fail in the notebook. You might want to check that out? |
I noticed you didn't load the panel extension in the notebook. You will definitely need to add that. I tried building your environment but its very heavy and
In a Notebook, if I add the I have noticed a race condition in the past where the All that said, I tried to the I removed the geopandas import and I'm seeing the same thing. I think this issue boils down to Panel Preview not working on Nebari, which looks like it may be a security issue within Jupyter. |
JupyterHub 4.1 introduced pretty restrictive CSP. In principle we can change CSP with For reference: |
Here is a related upstream issue: Quoting:
Nebari should implement per-user domains and then all these restrictions can be safely lifted. |
I have moved the issue of Panel Preview being unavailable to its own issue. |
Describe the bug
When a file, either .py or .ipynb, has the following line in it,
import geopandas as gpd
, it gives the following error when trying to preview the Panel app:It also does not render when you create an app and start an instance from the landing page.
Testing with another app not using geopandas allows it to render.
Expected behavior
The Panel app to render.
OS and architecture in which you are running Nebari
Linux/AWS EC2
How to Reproduce the problem?
Command output
No response
Versions and dependencies used.
channels:
dependencies:
variables: {}
Compute environment
AWS
Integrations
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: