Open timonmerk opened 11 months ago
@timonmerk Where you able to resolve this error? I am also getting the same error.
Same error. Though it's possible to manually add line_offset
to get_source()
in the pyodide/__init__.py
, and the output html does have a green play button to 'launch' pyodide env, but it will fail due to pure python3 tornado not found.
Below are the reproduce steps:
# create mamba env and install packages
mamba create -n test panel -y -c conda-forge -C
mamba activate test
mamba install -c pyviz nbsite -C -y
# init sphinx proj
sphinx-quickstart # init proj
sphinx-build source output # check if this work
# follow the instruction from https://panel.holoviz.org/how_to/wasm/sphinx.html, add content to source/index.rst and source/conf.py, then
sphinx-build source output # should fail for TypeError: StateMachine.get_source() missing 1 required positional argument: 'line_offset'
# open that site-packages/nbsite/pyodide/__init__.py and add a number, such as 4 to get_source() as its argument, then
sphinx-build source output # check if this work
python -m http.server 8000 # open browser and visit localhost:8000
Here shows the green button, click it, and it starts working until stuck at loading panel, open Inspect
option from browser, shows
Visit pyodide and tornado site, it seems that some build steps are required. Not sure how panel docs made it, because I also tried MyST markdown format (which is the format of panel doc source code) and build the doc both from Windows10 and WSL2, but they all failed.
I hope there is any progress for the bug fix. @MarcSkovMadsen
I am following this tutorial (https://panel.holoviz.org/how_to/wasm/sphinx.html), but unfortunately did not manage to build the documentation which show's the panel in sphix due to an import error based on pyodide in nbsite. I included in a
rst
file the following pyodide block:and also included the
nbsite_pyodide_conf
configuration in the sphinxconf.py
:When trying to run the documentation with
make html
I get however this error:I checked the official site of pyodide but could not see that the same line is being called.
For compleness here the full traceback from sphinx: