-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
IPyleaflet does not consistently work with Panel #3778
Comments
I see the same error as you. If I downgrade |
Ah, so the issue might be with ipywidgets. Thanks for the tip about installing an older version of ipywidgets! |
It seems like the new release of If that is the only change needed, the issue can be fixed by |
I hope that's not too difficult of a fix. Do you mind showing what you think this if statement might look like? |
I would check the ipywidgets version with packaging.version and based on the version set the correct attribute here: Line 62 in be3c59a
If you are up for it, you can make the PR. |
Thank you for fixing this! |
IPyleaflet does not consistently work with Panel
Description of expected behavior and the observed behavior
I've been attempting to create a Panel application with an ipyleaflet map in it. I have had issues getting the map to display using the command
panel serve sample_app.py --show
because it keeps displaying the same error messageAttributeError: 'Map' object has no attribute 'widgets'
even though I have installed all the relevant packages.What's strange is that when I install the same packages in a different order is I get no errors . I have included three
package_list.txt
that show the two environments I created that showcase this strange behavior. In the working version of the environment I describe below I installedipywidgets_bokeh
first and then installpanel
andipyleafelt
whereas with the broken version of the environment I installedpanel ipyleaflet
first followed byipywidgets_bokeh
and it displayed the error messageAttributeError: 'Map' object has no attribute 'widgets'.
Any idea why the order the packages being installed would impact whether this error message appears or not. I see each environment contains different versions of each package which may mean one package isn't compatible.
Thank you for any explanations for why this error might have occurred.
Complete, minimal, self-contained example code that reproduces the issue
Working Version of Environment
I have included the versions of all the installed packages below in
test_panel_package_list.txt
, which ran successfully.Broken Version of Environment
I have included the versions of all the installed packages below in
test_panel2_package_list.txt
, which displayed the error message below.Sample Code
Stack traceback and/or browser JavaScript console output
ALL software version info
OS: Windows 10
Anaconda Version: conda 4.10.3
Package List Files for Both Environments
test_panel_package_list.txt
test_panel2_package_list.txt
The text was updated successfully, but these errors were encountered: