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

"Build an app" in pyodide raises ImportError #6201

Closed
MarcSkovMadsen opened this issue Apr 22, 2024 · 1 comment
Closed

"Build an app" in pyodide raises ImportError #6201

MarcSkovMadsen opened this issue Apr 22, 2024 · 1 comment
Labels
type: bug Something isn't correct or isn't working type: docs Related to the documentation and examples

Comments

@MarcSkovMadsen
Copy link
Collaborator

When I open and run https://panelite.holoviz.org/lab?path=getting_started/build_app.ipynb I get

image

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
File /lib/python3.11/site-packages/IPython/core/formatters.py:977, in MimeBundleFormatter.__call__(self, obj, include, exclude)
    974     method = get_real_method(obj, self.print_method)
    976     if method is not None:
--> 977         return method(include=include, exclude=exclude)
    978     return None
    979 else:

File /lib/python3.11/site-packages/holoviews/core/dimension.py:1286, in Dimensioned._repr_mimebundle_(self, include, exclude)
   1279 def _repr_mimebundle_(self, include=None, exclude=None):
   1280     """
   1281     Resolves the class hierarchy for the class rendering the
   1282     object using any display hooks registered on Store.display
   1283     hooks.  The output of all registered display_hooks is then
   1284     combined and returned.
   1285     """
-> 1286     return Store.render(self)

File /lib/python3.11/site-packages/holoviews/core/options.py:1428, in Store.render(cls, obj)
   1426 data, metadata = {}, {}
   1427 for hook in hooks:
-> 1428     ret = hook(obj)
   1429     if ret is None:
   1430         continue

File /lib/python3.11/site-packages/holoviews/pyodide.py:32, in render_html(obj)
     31 def render_html(obj):
---> 32     from js import document
     33     if hasattr(sys.stdout, '_out'):
     34         target = sys.stdout._out # type: ignore

ImportError: cannot import name 'document' from 'js' (unknown location)
@MarcSkovMadsen MarcSkovMadsen added TRIAGE Needs triaging type: docs Related to the documentation and examples type: bug Something isn't correct or isn't working and removed TRIAGE Needs triaging labels Apr 22, 2024
@philippjfr philippjfr transferred this issue from holoviz/panel Apr 22, 2024
@hoxbro
Copy link
Member

hoxbro commented Jun 24, 2024

Can't recreate anymore, likely fixed by #6007
image

Try clearing your cache, if you still is experiencing this problem. If you still have a problem please reopen this issue.

@hoxbro hoxbro closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working type: docs Related to the documentation and examples
Projects
None yet
Development

No branches or pull requests

2 participants