Skip to content
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

Updated nicegui methods for js libraries requires updates #350

Closed
carlhiggs opened this issue Jul 24, 2023 · 0 comments
Closed

Updated nicegui methods for js libraries requires updates #350

carlhiggs opened this issue Jul 24, 2023 · 0 comments

Comments

@carlhiggs
Copy link
Collaborator

Describe the bug
The implementation of external javascript libraries seems to have changed in nicegui, and so the latest Docker image (4.4.8) that uses the newer version requires some changes (e.g. in order for our Leaflet implementation to work).

To Reproduce
On enhancements using image 4.4.8 and this portion of the current Leaflet.py code,

https://github.com/global-healthy-liveable-cities/global-indicators/blob/2ba788e601ebecbf374025986c69f9ac0ad9ea0e/process/subprocesses/leaflet.py#L3-L16

results in this error when attempting to launch the ghsci process:

# ghsci
Traceback (most recent call last):
  File "/home/ghsci/process/gui.py", line 18, in <module>
    from subprocesses.leaflet import leaflet
  File "/home/ghsci/process/subprocesses/leaflet.py", line 6, in <module>
    from nicegui.dependencies import register_component
ImportError: cannot import name 'register_component' from 'nicegui.dependencies' (/env/lib/python3.10/site-packages/nicegui/dependencies.py)

This relates to changes in nicegui, as per their Leaflet map example that I based this code on:
zauberzeug/nicegui@4c5745b

So -- we just need to update to use the updated syntax

carlhiggs added a commit that referenced this issue Jul 24, 2023
@carlhiggs carlhiggs mentioned this issue Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant