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

pyodide option not work in jupyter lite serve #43

Open
liudonghua123 opened this issue Mar 19, 2022 · 6 comments
Open

pyodide option not work in jupyter lite serve #43

liudonghua123 opened this issue Mar 19, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@liudonghua123
Copy link

liudonghua123 commented Mar 19, 2022

Description

I tried to execute jupyter lite serve --pyodide=pyodide --mathjax-dir=MathJax-2.7.5 after jupyter lite init--pyodide=pyodide --mathjax-dir=MathJax-2.7.5. The init command worked, but serve command failed with the following errors.

......
.  build:pyodide:copy:pyodide
TaskError - taskid:build:pyodide:copy:pyodide
PythonAction Error
Traceback (most recent call last):
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\doit\action.py", line 437, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\base.py", line 65, in copy_one
    shutil.copy2(src, dest)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\code\\python\\jupyterlite\\test\\.cache\\pyodide\\pyodide\\pyodide'

Reproduce

  1. unzip pyodide and mathjax to the cwd
  2. jupyter lite int --pyodide=pyodide --mathjax-dir=MathJax-2.7.5
  3. jupyter lite serve --pyodide=pyodide --mathjax-dir=MathJax-2.7.5

Expected behavior

The serve command should work.

Context

  • JupyterLite version: 0.1.0b3
  • Operating System and version: Microsoft Windows [Version 10.0.22000.556]
  • Browser and version: Chrome 99
@bollwyvl
Copy link
Contributor

The upstream distribution has a pydodide folder inside it, and so we preserve that it the cache, to avoid path surprises, have you tried unpacking it directly from the upstream, preserving that layer?

The alternative is to specify the path to the archive: it will only re-unpack it to the cache if the archive has changed.

@liudonghua123
Copy link
Author

liudonghua123 commented Mar 21, 2022

I tired in another computer with relative or absolute pyodide path, It's the same error. And I also test with pyodide-build-0.19.1.tar.bz2, this works.

So the actural problem the cached pyodide path of direct provided and compressed bz2 is not matched. The compressed bz2 have a top level pyodide folder already.

@@ -176,7 +176,7 @@
                 will_fetch = True
         else:
             local_path = (self.manager.lite_dir / path_or_url).resolve()
-            dest = self.pyodide_cache / local_path.name
+            dest = self.pyodide_cache / PYODIDE

         if local_path.is_dir():
             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
@@ -184,7 +184,7 @@
                 name=f"copy:pyodide:{local_path.name}",
                 file_dep=[*all_paths],
                 targets=[dest / p.relative_to(local_path) for p in all_paths],
-                actions=[(self.copy_one, [local_path, dest])],
+                actions=[(self.copy_one, [local_path, dest / PYODIDE])],
             )

         elif local_path.exists() or will_fetch:
cmd log (modified `%LocalAppData%\Programs\Python\Python310\Lib\site-packages\jupyterlite\addons\pyodide.py` via add some @Snoop for debugging
D:\code\python\jupyterlite\test>jupyter lite serve --pyodide=pyodide --mathjax-dir=MathJax-2.7.5
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.1.0-beta.3.tgz 8MB
    output:          D:\code\python\jupyterlite\test\_output
    lite dir:        D:\code\python\jupyterlite\test
    apps:
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
lite:jupyter-lite.json
mathjax:status
09:51:25.75 >>> Start generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 52
09:51:25.75 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
09:51:25.75 .......... manager = <jupyterlite.manager.LiteManager object at 0x000002E5F5F24DC0>
09:51:25.75   52 |     def status(self, manager):
09:51:25.75   54 |         yield dict(
09:51:25.75   55 |             name="pyodide",
09:51:25.76   57 |                 lambda: print(
09:51:25.76   60 |                 lambda: print(f" archive: {[*self.pyodide_cache.glob('*.bz2')]}"),
09:51:25.76   61 |                 lambda: print(
09:51:25.76   64 |                 lambda: print(
09:51:25.76   56 |             actions=[
09:51:25.76   54 |         yield dict(
09:51:25.76 <<< Yield value from PyodideAddon.status: {'name': 'pyodide', 'actions': [<function PyodideAddon.status.<locals>.<lambda> at 0x000002E58886CCA0>, <function PyodideAddon.status.<locals>.<lambda> at 0x000002E58886CD30>, <function PyodideAddon.status.<locals>.<lambda> at 0x000002E58886CE50>, <function PyodideAddon.status.<locals>.<lambda> at 0x000002E58886CEE0>]}
pyodide:pyodide
09:51:25.76 >>> Re-enter generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 54
09:51:25.76 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
09:51:25.76 .............. manager = <jupyterlite.manager.LiteManager object at 0x000002E5F5F24DC0>
09:51:25.76   54 |         yield dict(
09:51:25.76 <<< Return value from PyodideAddon.status: None
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteServeApp] No archive (yet): test-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:lite:jupyter-lite.json
[LiteServeApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mathjax:status
     jupyter-server-mathjax: None
     configured MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
     effective MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
.  status:pyodide:pyodide
     URL: pyodide
 archive: []
   cache: 305 files
   local: 0 files
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 0 files
static:output_dir
-- pre_init:static:output_dir
static:unpack
.  init:static:unpack
09:51:34.67 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 71
09:51:34.67 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
09:51:34.67 .......... manager = <jupyterlite.manager.LiteManager object at 0x000002E5F5F24DC0>
09:51:34.67   71 |     def post_init(self, manager):
09:51:34.67   73 |         if manager.pyodide_url is None:
09:51:34.67   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    09:51:34.67 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 176
    09:51:34.67 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
    09:51:34.67 .......... path_or_url = 'pyodide'
    09:51:34.67  176 |     def cache_pyodide(self, path_or_url):
    09:51:34.68  178 |         if re.findall(r"^https?://", path_or_url):
    09:51:34.68  192 |             local_path = (self.manager.lite_dir / path_or_url).resolve()
    09:51:34.68 .................. local_path = WindowsPath('D:/code/python/jupyterlite/test/pyodide')
    09:51:34.68  193 |             dest = self.pyodide_cache / local_path.name
    09:51:34.68 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    09:51:34.68  195 |         if local_path.is_dir():
    09:51:34.68  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
        09:51:34.68 List comprehension:
        09:51:34.68  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
        09:51:34.74 .................. Iterating over <generator object Path.rglob at 0x000002E588871B60>
        09:51:34.74 .................. Values of p: WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymReg.ttf')
        09:51:34.74 Result: [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymReg.ttf')]
    09:51:34.74  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
    09:51:34.74 .................. all_paths = [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')]
    09:51:34.74 .................. len(all_paths) = 303
    09:51:34.74  197 |             yield dict(
    09:51:34.75  198 |                 name=f"copy:pyodide:{local_path.name}",
    09:51:34.75  199 |                 file_dep=[*all_paths],
    09:51:34.75  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
        09:51:34.75 List comprehension:
        09:51:34.75  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
        09:51:34.81 .................. Iterating over <list_iterator object at 0x000002E5888751E0>
        09:51:34.81 .................. Values of dest: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        09:51:34.81 .................. Values of local_path: WindowsPath('D:/code/python/jupyterlite/test/pyodide')
        09:51:34.81 .................. Values of p: WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/yt.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')
        09:51:34.81 Result: [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')]
    09:51:34.81  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
    09:51:34.81  201 |                 actions=[(self.copy_one, [local_path, dest])],
    09:51:34.81  197 |             yield dict(
    09:51:34.81 <<< Yield value from PyodideAddon.cache_pyodide: {'name': 'copy:pyodide:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>>, [...])]}
09:51:34.81   76 |         yield from self.cache_pyodide(manager.pyodide_url)
09:51:34.81 <<< Return value from PyodideAddon.post_init: {'name': 'copy:pyodide:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>>, [...])]}
pyodide:copy:pyodide:pyodide
09:51:34.82 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 76
09:51:34.82 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
09:51:34.82 .............. manager = <jupyterlite.manager.LiteManager object at 0x000002E5F5F24DC0>
09:51:34.82   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    09:51:34.82 >>> Re-enter generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 197
    09:51:34.82 .................. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
    09:51:34.82 .................. path_or_url = 'pyodide'
    09:51:34.82 .................. all_paths = [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')]
    09:51:34.82 .................. len(all_paths) = 303
    09:51:34.82 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    09:51:34.82 .................. local_path = WindowsPath('D:/code/python/jupyterlite/test/pyodide')
    09:51:34.82  197 |             yield dict(
    09:51:34.82 <<< Return value from PyodideAddon.cache_pyodide: None
09:51:34.82   76 |         yield from self.cache_pyodide(manager.pyodide_url)
09:51:34.82 <<< Return value from PyodideAddon.post_init: None
-- post_init:pyodide:copy:pyodide:pyodide
federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
.  pre_build:federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
mathjax:copy
09:51:35.24 >>> Start generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 78
09:51:35.24 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
09:51:35.24 .......... manager = <jupyterlite.manager.LiteManager object at 0x000002E5F5F24DC0>
09:51:35.24   78 |     def build(self, manager):
09:51:35.24   80 |         cached_pyodide = self.pyodide_cache / PYODIDE / PYODIDE
09:51:35.24 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:51:35.24   82 |         the_pyodide = None
09:51:35.24   84 |         if self.well_known_pyodide.exists():
09:51:35.24   86 |         elif manager.pyodide_url is not None:
09:51:35.24   87 |             the_pyodide = cached_pyodide
09:51:35.24 .................. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:51:35.24   89 |         if not the_pyodide:
09:51:35.25   92 |         file_dep = [
09:51:35.25   94 |             for p in the_pyodide.rglob("*")
09:51:35.25   92 |         file_dep = [
    09:51:35.25 List comprehension:
    09:51:35.25   92 |         file_dep = [
    09:51:35.25 .............. Iterating over <generator object Path.rglob at 0x000002E58894D380>
    09:51:35.25 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
    09:51:35.25 Result: []
09:51:35.25   92 |         file_dep = [
09:51:35.25 .............. file_dep = []
09:51:35.25   98 |         yield dict(
09:51:35.25   99 |             name="copy:pyodide",
09:51:35.25  100 |             file_dep=file_dep,
09:51:35.25  101 |             targets=[
09:51:35.25  102 |                 self.output_pyodide / p.relative_to(the_pyodide) for p in file_dep
09:51:35.25  101 |             targets=[
    09:51:35.25 List comprehension:
    09:51:35.25  101 |             targets=[
    09:51:35.25 .............. Iterating over <list_iterator object at 0x000002E588876AD0>
    09:51:35.25 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
    09:51:35.25 .............. Values of the_pyodide: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
    09:51:35.25 Result: []
09:51:35.25  101 |             targets=[
09:51:35.25  104 |             actions=[(self.copy_one, [the_pyodide, self.output_pyodide])],
09:51:35.25   98 |         yield dict(
09:51:35.25 <<< Yield value from PyodideAddon.build: {'name': 'copy:pyodide', 'file_dep': [], 'targets': [], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>>, [...])]}
pyodide:copy:pyodide
09:51:35.25 >>> Re-enter generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 98
09:51:35.25 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000002E5F8790AC0>
09:51:35.25 .............. manager = <jupyterlite.manager.LiteManager object at 0x000002E5F5F24DC0>
09:51:35.25 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:51:35.25 .............. file_dep = []
09:51:35.25 .............. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:51:35.25   98 |         yield dict(
09:51:35.25 <<< Return value from PyodideAddon.build: None
translation:copy
.  build:mathjax:copy
.  build:pyodide:copy:pyodide
TaskError - taskid:build:pyodide:copy:pyodide
PythonAction Error
Traceback (most recent call last):
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\doit\action.py", line 437, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\base.py", line 64, in copy_one
    shutil.copy2(src, dest)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\code\\python\\jupyterlite\\test\\.cache\\pyodide\\pyodide\\pyodide'


D:\code\python\jupyterlite\test>rm -rf _output

D:\code\python\jupyterlite\test>jupyter lite serve --pyodide="D:\Downloads\pyodide-build-0.19.1.tar.bz2" --mathjax-dir=M
athJax-2.7.5
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.1.0-beta.3.tgz 8MB
    output:          D:\code\python\jupyterlite\test\_output
    lite dir:        D:\code\python\jupyterlite\test
    apps:
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
lite:jupyter-lite.json
mathjax:status
09:58:04.03 >>> Start generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 52
09:58:04.03 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:58:04.03 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:58:04.03   52 |     def status(self, manager):
09:58:04.03   54 |         yield dict(
09:58:04.03   55 |             name="pyodide",
09:58:04.03   57 |                 lambda: print(
09:58:04.03   60 |                 lambda: print(f" archive: {[*self.pyodide_cache.glob('*.bz2')]}"),
09:58:04.03   61 |                 lambda: print(
09:58:04.03   64 |                 lambda: print(
09:58:04.03   56 |             actions=[
09:58:04.03   54 |         yield dict(
09:58:04.03 <<< Yield value from PyodideAddon.status: {'name': 'pyodide', 'actions': [<function PyodideAddon.status.<locals>.<lambda> at 0x000001C08192CCA0>, <function PyodideAddon.status.<locals>.<lambda> at 0x000001C08192CD30>, <function PyodideAddon.status.<locals>.<lambda> at 0x000001C08192CE50>, <function PyodideAddon.status.<locals>.<lambda> at 0x000001C08192CEE0>]}
pyodide:pyodide
09:58:04.03 >>> Re-enter generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 54
09:58:04.03 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:58:04.03 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:58:04.03   54 |         yield dict(
09:58:04.03 <<< Return value from PyodideAddon.status: None
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteServeApp] No archive (yet): test-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:lite:jupyter-lite.json
[LiteServeApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mathjax:status
     jupyter-server-mathjax: None
     configured MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
     effective MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
.  status:pyodide:pyodide
     URL: D:\Downloads\pyodide-build-0.19.1.tar.bz2
 archive: []
   cache: 305 files
   local: 0 files
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 0 files
static:output_dir
-- pre_init:static:output_dir
static:unpack
.  init:static:unpack
09:58:11.73 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 71
09:58:11.73 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:58:11.73 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:58:11.73   71 |     def post_init(self, manager):
09:58:11.73   73 |         if manager.pyodide_url is None:
09:58:11.73   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    09:58:11.74 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 176
    09:58:11.74 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
    09:58:11.74 .......... path_or_url = 'D:\\Downloads\\pyodide-build-0.19.1.tar.bz2'
    09:58:11.74  176 |     def cache_pyodide(self, path_or_url):
    09:58:11.74  178 |         if re.findall(r"^https?://", path_or_url):
    09:58:11.74  192 |             local_path = (self.manager.lite_dir / path_or_url).resolve()
    09:58:11.74 .................. local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
    09:58:11.74  193 |             dest = self.pyodide_cache / local_path.name
    09:58:11.74 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide-build-0.19.1.tar.bz2')
    09:58:11.74  195 |         if local_path.is_dir():
    09:58:11.74  204 |         elif local_path.exists() or will_fetch:
    09:58:11.74  205 |             suffix = local_path.suffix
    09:58:11.74 .................. suffix = '.bz2'
    09:58:11.74  206 |             extracted = self.pyodide_cache / PYODIDE
    09:58:11.74 .................. extracted = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    09:58:11.74  208 |             if suffix == ".bz2":
    09:58:11.74  209 |                 yield from self.extract_pyodide(local_path, extracted)
        09:58:11.74 >>> Start generator PyodideAddon.extract_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 215
        09:58:11.74 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
        09:58:11.74 .......... local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
        09:58:11.74 .......... dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        09:58:11.74  215 |     def extract_pyodide(self, local_path, dest):
        09:58:11.74  218 |         def _extract():
        09:58:11.74  224 |         task = dict(
        09:58:11.74  225 |             name="extract:pyodide",
        09:58:11.74  226 |             file_dep=[local_path],
        09:58:11.74  228 |                 doit.tools.config_changed(
        09:58:11.74  229 |                     dict(no_sourcemaps=self.manager.no_sourcemaps)
        09:58:11.74  228 |                 doit.tools.config_changed(
        09:58:11.74  227 |             uptodate=[
        09:58:11.74  234 |                 dest / PYODIDE / PYODIDE_JS,
        09:58:11.74  235 |                 dest / PYODIDE / PYODIDE_PACKAGES,
        09:58:11.74  232 |             targets=[
        09:58:11.74  237 |             actions=[_extract],
        09:58:11.74  224 |         task = dict(
        09:58:11.75 .............. task = {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x000001C081936E60>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
        09:58:11.75 .............. len(task) = 5
        09:58:11.75  240 |         yield task
        09:58:11.75 <<< Yield value from PyodideAddon.extract_pyodide: {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x000001C081936E60>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
    09:58:11.75  209 |                 yield from self.extract_pyodide(local_path, extracted)
    09:58:11.75 <<< Return value from PyodideAddon.cache_pyodide: {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x000001C081936E60>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
09:58:11.75   76 |         yield from self.cache_pyodide(manager.pyodide_url)
09:58:11.75 <<< Return value from PyodideAddon.post_init: {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x000001C081936E60>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
pyodide:extract:pyodide
09:58:11.75 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 76
09:58:11.75 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:58:11.75 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:58:11.75   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    09:58:11.75 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 209
    09:58:11.75 ...................... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
    09:58:11.75 ...................... path_or_url = 'D:\\Downloads\\pyodide-build-0.19.1.tar.bz2'
    09:58:11.75 ...................... suffix = '.bz2'
    09:58:11.75 ...................... extracted = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    09:58:11.75 ...................... dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide-build-0.19.1.tar.bz2')
    09:58:11.75 ...................... local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
    09:58:11.75  209 |                 yield from self.extract_pyodide(local_path, extracted)
        09:58:11.75 >>> Re-enter generator PyodideAddon.extract_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 240
        09:58:11.75 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
        09:58:11.75 .............. local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
        09:58:11.75 .............. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        09:58:11.75 .............. _extract = <function PyodideAddon.extract_pyodide.<locals>._extract at 0x000001C08192F910>
        09:58:11.75 .............. task = {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x000001C081936E60>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
        09:58:11.75 .............. len(task) = 5
        09:58:11.75  240 |         yield task
        09:58:11.75 <<< Return value from PyodideAddon.extract_pyodide: None
    09:58:11.75  209 |                 yield from self.extract_pyodide(local_path, extracted)
    09:58:11.75 <<< Return value from PyodideAddon.cache_pyodide: None
09:58:11.75   76 |         yield from self.cache_pyodide(manager.pyodide_url)
09:58:11.75 <<< Return value from PyodideAddon.post_init: None
.  post_init:pyodide:extract:pyodide
federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
.  pre_build:federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
mathjax:copy
09:58:33.36 >>> Start generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 78
09:58:33.36 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:58:33.36 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:58:33.36   78 |     def build(self, manager):
09:58:33.36   80 |         cached_pyodide = self.pyodide_cache / PYODIDE / PYODIDE
09:58:33.36 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:58:33.36   82 |         the_pyodide = None
09:58:33.36   84 |         if self.well_known_pyodide.exists():
09:58:33.36   86 |         elif manager.pyodide_url is not None:
09:58:33.36   87 |             the_pyodide = cached_pyodide
09:58:33.36 .................. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:58:33.36   89 |         if not the_pyodide:
09:58:33.36   92 |         file_dep = [
09:58:33.36   94 |             for p in the_pyodide.rglob("*")
09:58:33.36   92 |         file_dep = [
    09:58:33.36 List comprehension:
    09:58:33.36   92 |         file_dep = [
    09:58:33.52 .............. Iterating over <generator object Path.rglob at 0x000001C081931A80>
    09:58:33.52 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
    09:58:33.52 .............. Values of p: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')
    09:58:33.52 Result: [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
09:58:33.52   92 |         file_dep = [
09:58:33.52 .............. file_dep = [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
09:58:33.52 .............. len(file_dep) = 303
09:58:33.52   98 |         yield dict(
09:58:33.52   99 |             name="copy:pyodide",
09:58:33.52  100 |             file_dep=file_dep,
09:58:33.52  101 |             targets=[
09:58:33.52  102 |                 self.output_pyodide / p.relative_to(the_pyodide) for p in file_dep
09:58:33.52  101 |             targets=[
    09:58:33.52 List comprehension:
    09:58:33.52  101 |             targets=[
    09:58:33.62 .............. Iterating over <list_iterator object at 0x000001C081940820>
    09:58:33.62 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
    09:58:33.62 .............. Values of the_pyodide: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
    09:58:33.62 .............. Values of p: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')
    09:58:33.62 Result: [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymReg.ttf')]
09:58:33.62  101 |             targets=[
09:58:33.62  104 |             actions=[(self.copy_one, [the_pyodide, self.output_pyodide])],
09:58:33.62   98 |         yield dict(
09:58:33.63 <<< Yield value from PyodideAddon.build: {'name': 'copy:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymReg.ttf')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>>, [...])]}
pyodide:copy:pyodide
09:58:33.63 >>> Re-enter generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 98
09:58:33.63 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:58:33.63 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:58:33.63 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:58:33.63 .............. file_dep = [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
09:58:33.63 .............. len(file_dep) = 303
09:58:33.63 .............. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
09:58:33.63   98 |         yield dict(
09:58:33.63 <<< Return value from PyodideAddon.build: None
translation:copy
.  build:mathjax:copy
.  build:pyodide:copy:pyodide
.  build:translation:copy
federated_extensions:patch
mathjax:patch
09:59:06.24 >>> Start generator PyodideAddon.post_build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 108
09:59:06.24 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:59:06.24 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:59:06.24  108 |     def post_build(self, manager):
09:59:06.24  110 |         if not self.well_known_pyodide.exists() and manager.pyodide_url is None:
09:59:06.24  113 |         jupyterlite_json = manager.output_dir / JUPYTERLITE_JSON
09:59:06.24 .............. jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
09:59:06.24  115 |         output_js = self.output_pyodide / PYODIDE_JS
09:59:06.24 .............. output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
09:59:06.24  117 |         yield dict(
09:59:06.25  118 |             name=f"patch:{JUPYTERLITE_JSON}",
09:59:06.25  119 |             doc=f"ensure {JUPYTERLITE_JSON} includes any piplite wheels",
09:59:06.25  120 |             file_dep=[output_js],
09:59:06.25  123 |                     self.patch_jupyterlite_json,
09:59:06.25  124 |                     [jupyterlite_json, output_js],
09:59:06.25  122 |                 (
09:59:06.25  121 |             actions=[
09:59:06.25  117 |         yield dict(
09:59:06.25 <<< Yield value from PyodideAddon.post_build: {'name': 'patch:jupyter-lite.json', 'doc': 'ensure jupyter-lite.json includes any piplite wheels', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')], 'actions': [(<bound method PyodideAddon.patch_jupyterlite_json of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>>, [...])]}
pyodide:patch:jupyter-lite.json
09:59:06.25 >>> Re-enter generator PyodideAddon.post_build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 117
09:59:06.25 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:59:06.25 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001C0EEF84DC0>
09:59:06.25 .............. jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
09:59:06.25 .............. output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
09:59:06.25  117 |         yield dict(
09:59:06.25 <<< Return value from PyodideAddon.post_build: None
.  post_build:federated_extensions:patch
.  post_build:mathjax:patch
.  post_build:pyodide:patch:jupyter-lite.json
09:59:06.26 >>> Call to PyodideAddon.patch_jupyterlite_json in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 161
09:59:06.26 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001C0F1820AC0>
09:59:06.26 .......... jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
09:59:06.26 .......... output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
09:59:06.26  161 |     def patch_jupyterlite_json(self, jupyterlite_json, output_js):
09:59:06.26  163 |         config = json.loads(jupyterlite_json.read_text(**UTF8))
09:59:06.26 .............. config = {'jupyter-config-data': {'appName': 'JupyterLite', 'appUrl': './lab', 'appVersion': '0.1.0-beta.3', 'baseUrl': './', ...}, 'jupyter-lite-schema-version': 0}
09:59:06.26 .............. len(config) = 2
09:59:06.26  164 |         pyolite_config = (
09:59:06.26  165 |             config.setdefault(JUPYTER_CONFIG_DATA, {})
09:59:06.26  166 |             .setdefault(LITE_PLUGIN_SETTINGS, {})
09:59:06.26  167 |             .setdefault(PYOLITE_PLUGIN_ID, {})
09:59:06.26  164 |         pyolite_config = (
09:59:06.26 .............. pyolite_config = {}
09:59:06.26  169 |         url = "./{}".format(output_js.relative_to(self.manager.output_dir).as_posix())
09:59:06.27 .............. url = './static/pyodide/pyodide.js'
09:59:06.27  170 |         if pyolite_config.get(PYODIDE_URL) != url:
09:59:06.27  171 |             pyolite_config[PYODIDE_URL] = url
09:59:06.27 .................. pyolite_config = {'pyodideUrl': './static/pyodide/pyodide.js'}
09:59:06.27 .................. len(pyolite_config) = 1
09:59:06.27  172 |             jupyterlite_json.write_text(json.dumps(config, **JSON_FMT), **UTF8)
09:59:06.27  173 |             self.maybe_timestamp(jupyterlite_json)
09:59:06.27 <<< Return value from PyodideAddon.patch_jupyterlite_json: None
serve:tornado
.  serve:serve:tornado
[LiteServeApp] WARNING |

        Serving JupyterLite Debug Server from:
            D:\code\python\jupyterlite\test\_output
        on:
            http://127.0.0.1:8000/index.html

        *** Exit by: ***
            - Pressing Ctrl+C
            - Visiting /shutdown

[LiteServeApp] WARNING | Stopping http://127.0.0.1:8000/

D:\code\python\jupyterlite\test>rm -rf _output

D:\code\python\jupyterlite\test>jupyter lite serve --pyodide="D:\code\python\jupyterlite\test\pyodide" --mathjax-dir=Mat
hJax-2.7.5
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.1.0-beta.3.tgz 8MB
    output:          D:\code\python\jupyterlite\test\_output
    lite dir:        D:\code\python\jupyterlite\test
    apps:
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
lite:jupyter-lite.json
mathjax:status
10:04:46.49 >>> Start generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 52
10:04:46.49 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
10:04:46.49 .......... manager = <jupyterlite.manager.LiteManager object at 0x00000243D0F24DC0>
10:04:46.49   52 |     def status(self, manager):
10:04:46.49   54 |         yield dict(
10:04:46.49   55 |             name="pyodide",
10:04:46.49   57 |                 lambda: print(
10:04:46.49   60 |                 lambda: print(f" archive: {[*self.pyodide_cache.glob('*.bz2')]}"),
10:04:46.49   61 |                 lambda: print(
10:04:46.49   64 |                 lambda: print(
10:04:46.49   56 |             actions=[
10:04:46.49   54 |         yield dict(
10:04:46.50 <<< Yield value from PyodideAddon.status: {'name': 'pyodide', 'actions': [<function PyodideAddon.status.<locals>.<lambda> at 0x00000243E380CCA0>, <function PyodideAddon.status.<locals>.<lambda> at 0x00000243E380CD30>, <function PyodideAddon.status.<locals>.<lambda> at 0x00000243E380CE50>, <function PyodideAddon.status.<locals>.<lambda> at 0x00000243E380CEE0>]}
pyodide:pyodide
10:04:46.50 >>> Re-enter generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 54
10:04:46.50 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
10:04:46.50 .............. manager = <jupyterlite.manager.LiteManager object at 0x00000243D0F24DC0>
10:04:46.50   54 |         yield dict(
10:04:46.50 <<< Return value from PyodideAddon.status: None
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteServeApp] No archive (yet): test-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:lite:jupyter-lite.json
[LiteServeApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mathjax:status
     jupyter-server-mathjax: None
     configured MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
     effective MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
.  status:pyodide:pyodide
     URL: D:\code\python\jupyterlite\test\pyodide
 archive: []
   cache: 306 files
   local: 0 files
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 0 files
static:output_dir
-- pre_init:static:output_dir
static:unpack
.  init:static:unpack
10:04:53.55 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 71
10:04:53.55 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
10:04:53.55 .......... manager = <jupyterlite.manager.LiteManager object at 0x00000243D0F24DC0>
10:04:53.55   71 |     def post_init(self, manager):
10:04:53.55   73 |         if manager.pyodide_url is None:
10:04:53.55   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    10:04:53.55 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 176
    10:04:53.55 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
    10:04:53.55 .......... path_or_url = 'D:\\code\\python\\jupyterlite\\test\\pyodide'
    10:04:53.55  176 |     def cache_pyodide(self, path_or_url):
    10:04:53.55  178 |         if re.findall(r"^https?://", path_or_url):
    10:04:53.55  192 |             local_path = (self.manager.lite_dir / path_or_url).resolve()
    10:04:53.55 .................. local_path = WindowsPath('D:/code/python/jupyterlite/test/pyodide')
    10:04:53.55  193 |             dest = self.pyodide_cache / local_path.name
    10:04:53.55 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:04:53.55  195 |         if local_path.is_dir():
    10:04:53.55  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
        10:04:53.55 List comprehension:
        10:04:53.55  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
        10:04:53.60 .................. Iterating over <generator object Path.rglob at 0x00000243E38120A0>
        10:04:53.60 .................. Values of p: WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymReg.ttf')
        10:04:53.60 Result: [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymReg.ttf')]
    10:04:53.61  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
    10:04:53.61 .................. all_paths = [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')]
    10:04:53.61 .................. len(all_paths) = 303
    10:04:53.61  197 |             yield dict(
    10:04:53.61  198 |                 name=f"copy:pyodide:{local_path.name}",
    10:04:53.61  199 |                 file_dep=[*all_paths],
    10:04:53.61  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
        10:04:53.61 List comprehension:
        10:04:53.61  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
        10:04:53.66 .................. Iterating over <list_iterator object at 0x00000243E3815510>
        10:04:53.66 .................. Values of dest: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        10:04:53.66 .................. Values of local_path: WindowsPath('D:/code/python/jupyterlite/test/pyodide')
        10:04:53.66 .................. Values of p: WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/yt.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')
        10:04:53.66 Result: [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')]
    10:04:53.66  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
    10:04:53.66  201 |                 actions=[(self.copy_one, [local_path, dest])],
    10:04:53.66  197 |             yield dict(
    10:04:53.66 <<< Yield value from PyodideAddon.cache_pyodide: {'name': 'copy:pyodide:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>>, [...])]}
10:04:53.66   76 |         yield from self.cache_pyodide(manager.pyodide_url)
10:04:53.66 <<< Return value from PyodideAddon.post_init: {'name': 'copy:pyodide:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>>, [...])]}
pyodide:copy:pyodide:pyodide
10:04:53.67 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 76
10:04:53.67 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
10:04:53.67 .............. manager = <jupyterlite.manager.LiteManager object at 0x00000243D0F24DC0>
10:04:53.67   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    10:04:53.67 >>> Re-enter generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 197
    10:04:53.67 .................. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
    10:04:53.67 .................. path_or_url = 'D:\\code\\python\\jupyterlite\\test\\pyodide'
    10:04:53.67 .................. all_paths = [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')]
    10:04:53.67 .................. len(all_paths) = 303
    10:04:53.67 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:04:53.67 .................. local_path = WindowsPath('D:/code/python/jupyterlite/test/pyodide')
    10:04:53.67  197 |             yield dict(
    10:04:53.67 <<< Return value from PyodideAddon.cache_pyodide: None
10:04:53.67   76 |         yield from self.cache_pyodide(manager.pyodide_url)
10:04:53.67 <<< Return value from PyodideAddon.post_init: None
.  post_init:pyodide:copy:pyodide:pyodide
federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
.  pre_build:federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
mathjax:copy
10:04:54.84 >>> Start generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 78
10:04:54.84 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
10:04:54.84 .......... manager = <jupyterlite.manager.LiteManager object at 0x00000243D0F24DC0>
10:04:54.84   78 |     def build(self, manager):
10:04:54.84   80 |         cached_pyodide = self.pyodide_cache / PYODIDE / PYODIDE
10:04:54.84 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:04:54.84   82 |         the_pyodide = None
10:04:54.84   84 |         if self.well_known_pyodide.exists():
10:04:54.85   86 |         elif manager.pyodide_url is not None:
10:04:54.85   87 |             the_pyodide = cached_pyodide
10:04:54.85 .................. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:04:54.85   89 |         if not the_pyodide:
10:04:54.85   92 |         file_dep = [
10:04:54.85   94 |             for p in the_pyodide.rglob("*")
10:04:54.85   92 |         file_dep = [
    10:04:54.85 List comprehension:
    10:04:54.85   92 |         file_dep = [
    10:04:54.85 .............. Iterating over <generator object Path.rglob at 0x00000243E387A340>
    10:04:54.85 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
    10:04:54.85 Result: []
10:04:54.85   92 |         file_dep = [
10:04:54.85 .............. file_dep = []
10:04:54.85   98 |         yield dict(
10:04:54.85   99 |             name="copy:pyodide",
10:04:54.85  100 |             file_dep=file_dep,
10:04:54.85  101 |             targets=[
10:04:54.85  102 |                 self.output_pyodide / p.relative_to(the_pyodide) for p in file_dep
10:04:54.85  101 |             targets=[
    10:04:54.85 List comprehension:
    10:04:54.85  101 |             targets=[
    10:04:54.85 .............. Iterating over <list_iterator object at 0x00000243E3722680>
    10:04:54.85 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
    10:04:54.85 .............. Values of the_pyodide: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
    10:04:54.85 Result: []
10:04:54.85  101 |             targets=[
10:04:54.85  104 |             actions=[(self.copy_one, [the_pyodide, self.output_pyodide])],
10:04:54.85   98 |         yield dict(
10:04:54.85 <<< Yield value from PyodideAddon.build: {'name': 'copy:pyodide', 'file_dep': [], 'targets': [], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>>, [...])]}
pyodide:copy:pyodide
10:04:54.85 >>> Re-enter generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 98
10:04:54.85 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x00000243D37C0AC0>
10:04:54.85 .............. manager = <jupyterlite.manager.LiteManager object at 0x00000243D0F24DC0>
10:04:54.85 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:04:54.85 .............. file_dep = []
10:04:54.85 .............. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:04:54.85   98 |         yield dict(
10:04:54.85 <<< Return value from PyodideAddon.build: None
translation:copy
.  build:mathjax:copy
.  build:pyodide:copy:pyodide
TaskError - taskid:build:pyodide:copy:pyodide
PythonAction Error
Traceback (most recent call last):
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\doit\action.py", line 437, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\base.py", line 64, in copy_one
    shutil.copy2(src, dest)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\code\\python\\jupyterlite\\test\\.cache\\pyodide\\pyodide\\pyodide'


D:\code\python\jupyterlite\test>

I tested with the changed code above. it seems works.

log
D:\code\python\jupyterlite\test>jupyter lite serve --pyodide=pyodide --mathjax-dir=MathJax-2.7.5
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.1.0-beta.3.tgz 8MB
    output:          D:\code\python\jupyterlite\test\_output
    lite dir:        D:\code\python\jupyterlite\test
    apps:
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
lite:jupyter-lite.json
mathjax:status
10:40:46.36 >>> Start generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 52
10:40:46.36 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:40:46.36 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:40:46.36   52 |     def status(self, manager):
10:40:46.36   54 |         yield dict(
10:40:46.36   55 |             name="pyodide",
10:40:46.36   57 |                 lambda: print(
10:40:46.36   60 |                 lambda: print(f" archive: {[*self.pyodide_cache.glob('*.bz2')]}"),
10:40:46.36   61 |                 lambda: print(
10:40:46.36   64 |                 lambda: print(
10:40:46.36   56 |             actions=[
10:40:46.36   54 |         yield dict(
10:40:46.36 <<< Yield value from PyodideAddon.status: {'name': 'pyodide', 'actions': [<function PyodideAddon.status.<locals>.<lambda> at 0x000001B418A8CCA0>, <function PyodideAddon.status.<locals>.<lambda> at 0x000001B418A8CD30>, <function PyodideAddon.status.<locals>.<lambda> at 0x000001B418A8CE50>, <function PyodideAddon.status.<locals>.<lambda> at 0x000001B418A8CEE0>]}
pyodide:pyodide
10:40:46.36 >>> Re-enter generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 54
10:40:46.36 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:40:46.36 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:40:46.36   54 |         yield dict(
10:40:46.36 <<< Return value from PyodideAddon.status: None
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteServeApp] No archive (yet): test-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:lite:jupyter-lite.json
[LiteServeApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mathjax:status
     jupyter-server-mathjax: None
     configured MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
     effective MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
.  status:pyodide:pyodide
     URL: pyodide
 archive: []
   cache: 0 files
   local: 0 files
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 0 files
static:output_dir
-- pre_init:static:output_dir
static:unpack
.  init:static:unpack
10:40:53.14 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 71
10:40:53.14 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:40:53.14 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:40:53.14   71 |     def post_init(self, manager):
10:40:53.14   73 |         if manager.pyodide_url is None:
10:40:53.14   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    10:40:53.14 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 176
    10:40:53.14 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
    10:40:53.14 .......... path_or_url = 'pyodide'
    10:40:53.14  176 |     def cache_pyodide(self, path_or_url):
    10:40:53.14  178 |         if re.findall(r"^https?://", path_or_url):
    10:40:53.14  192 |             local_path = (self.manager.lite_dir / path_or_url).resolve()
    10:40:53.14 .................. local_path = WindowsPath('D:/code/python/jupyterlite/test/pyodide')
    10:40:53.14  193 |             dest = self.pyodide_cache / PYODIDE
    10:40:53.14 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:40:53.14  195 |         if local_path.is_dir():
    10:40:53.14  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
        10:40:53.14 List comprehension:
        10:40:53.14  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
        10:40:53.19 .................. Iterating over <generator object Path.rglob at 0x000001B418A92570>
        10:40:53.19 .................. Values of p: WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymReg.ttf')
        10:40:53.19 Result: [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/fonts/STIXSizTwoSymReg.ttf')]
    10:40:53.19  196 |             all_paths = sorted([p for p in local_path.rglob("*") if not p.is_dir()])
    10:40:53.19 .................. all_paths = [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')]
    10:40:53.19 .................. len(all_paths) = 303
    10:40:53.19  197 |             yield dict(
    10:40:53.19  198 |                 name=f"copy:pyodide:{local_path.name}",
    10:40:53.19  199 |                 file_dep=[*all_paths],
    10:40:53.19  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
        10:40:53.19 List comprehension:
        10:40:53.19  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
        10:40:53.24 .................. Iterating over <list_iterator object at 0x000001B418A953C0>
        10:40:53.24 .................. Values of dest: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        10:40:53.24 .................. Values of local_path: WindowsPath('D:/code/python/jupyterlite/test/pyodide')
        10:40:53.24 .................. Values of p: WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/yt.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')
        10:40:53.24 Result: [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')]
    10:40:53.24  200 |                 targets=[dest / p.relative_to(local_path) for p in all_paths],
    10:40:53.24  201 |                 actions=[(self.copy_one, [local_path, dest / PYODIDE])],
    10:40:53.24  197 |             yield dict(
    10:40:53.24 <<< Yield value from PyodideAddon.cache_pyodide: {'name': 'copy:pyodide:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>>, [...])]}
10:40:53.24   76 |         yield from self.cache_pyodide(manager.pyodide_url)
10:40:53.24 <<< Return value from PyodideAddon.post_init: {'name': 'copy:pyodide:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/zarr.js')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>>, [...])]}
pyodide:copy:pyodide:pyodide
10:40:53.25 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 76
10:40:53.25 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:40:53.25 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:40:53.25   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    10:40:53.25 >>> Re-enter generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 197
    10:40:53.25 .................. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
    10:40:53.25 .................. path_or_url = 'pyodide'
    10:40:53.25 .................. all_paths = [WindowsPath('D:/code/python/jupyterlite/test/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr-tests.js'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.data'), WindowsPath('D:/code/python/jupyterlite/test/pyodide/zarr.js')]
    10:40:53.25 .................. len(all_paths) = 303
    10:40:53.25 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:40:53.25 .................. local_path = WindowsPath('D:/code/python/jupyterlite/test/pyodide')
    10:40:53.25  197 |             yield dict(
    10:40:53.25 <<< Return value from PyodideAddon.cache_pyodide: None
10:40:53.25   76 |         yield from self.cache_pyodide(manager.pyodide_url)
10:40:53.25 <<< Return value from PyodideAddon.post_init: None
.  post_init:pyodide:copy:pyodide:pyodide
federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
.  pre_build:federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
mathjax:copy
10:40:55.07 >>> Start generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 78
10:40:55.07 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:40:55.07 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:40:55.07   78 |     def build(self, manager):
10:40:55.07   80 |         cached_pyodide = self.pyodide_cache / PYODIDE / PYODIDE
10:40:55.07 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:40:55.07   82 |         the_pyodide = None
10:40:55.07   84 |         if self.well_known_pyodide.exists():
10:40:55.07   86 |         elif manager.pyodide_url is not None:
10:40:55.07   87 |             the_pyodide = cached_pyodide
10:40:55.07 .................. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:40:55.07   89 |         if not the_pyodide:
10:40:55.07   92 |         file_dep = [
10:40:55.07   94 |             for p in the_pyodide.rglob("*")
10:40:55.07   92 |         file_dep = [
    10:40:55.07 List comprehension:
    10:40:55.07   92 |         file_dep = [
    10:40:58.11 .............. Iterating over <generator object Path.rglob at 0x000001B418B366C0>
    10:40:58.11 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
    10:40:58.11 .............. Values of p: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')
    10:40:58.11 Result: [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:40:58.11   92 |         file_dep = [
10:40:58.11 .............. file_dep = [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:40:58.11 .............. len(file_dep) = 303
10:40:58.11   98 |         yield dict(
10:40:58.11   99 |             name="copy:pyodide",
10:40:58.11  100 |             file_dep=file_dep,
10:40:58.11  101 |             targets=[
10:40:58.11  102 |                 self.output_pyodide / p.relative_to(the_pyodide) for p in file_dep
10:40:58.11  101 |             targets=[
    10:40:58.11 List comprehension:
    10:40:58.11  101 |             targets=[
    10:40:58.20 .............. Iterating over <list_iterator object at 0x000001B4189A21D0>
    10:40:58.20 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
    10:40:58.20 .............. Values of the_pyodide: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
    10:40:58.20 .............. Values of p: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')
    10:40:58.20 Result: [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:40:58.20  101 |             targets=[
10:40:58.20  104 |             actions=[(self.copy_one, [the_pyodide, self.output_pyodide])],
10:40:58.20   98 |         yield dict(
10:40:58.20 <<< Yield value from PyodideAddon.build: {'name': 'copy:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymReg.ttf')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>>, [...])]}
pyodide:copy:pyodide
10:40:58.21 >>> Re-enter generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 98
10:40:58.21 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:40:58.21 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:40:58.21 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:40:58.21 .............. file_dep = [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:40:58.21 .............. len(file_dep) = 303
10:40:58.21 .............. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:40:58.21   98 |         yield dict(
10:40:58.21 <<< Return value from PyodideAddon.build: None
translation:copy
.  build:mathjax:copy
.  build:pyodide:copy:pyodide
.  build:translation:copy
federated_extensions:patch
mathjax:patch
10:41:34.73 >>> Start generator PyodideAddon.post_build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 108
10:41:34.73 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:41:34.73 .......... manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:41:34.73  108 |     def post_build(self, manager):
10:41:34.73  110 |         if not self.well_known_pyodide.exists() and manager.pyodide_url is None:
10:41:34.73  113 |         jupyterlite_json = manager.output_dir / JUPYTERLITE_JSON
10:41:34.74 .............. jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
10:41:34.74  115 |         output_js = self.output_pyodide / PYODIDE_JS
10:41:34.74 .............. output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
10:41:34.74  117 |         yield dict(
10:41:34.74  118 |             name=f"patch:{JUPYTERLITE_JSON}",
10:41:34.74  119 |             doc=f"ensure {JUPYTERLITE_JSON} includes any piplite wheels",
10:41:34.74  120 |             file_dep=[output_js],
10:41:34.74  123 |                     self.patch_jupyterlite_json,
10:41:34.74  124 |                     [jupyterlite_json, output_js],
10:41:34.74  122 |                 (
10:41:34.74  121 |             actions=[
10:41:34.74  117 |         yield dict(
10:41:34.74 <<< Yield value from PyodideAddon.post_build: {'name': 'patch:jupyter-lite.json', 'doc': 'ensure jupyter-lite.json includes any piplite wheels', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')], 'actions': [(<bound method PyodideAddon.patch_jupyterlite_json of <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>>, [...])]}
pyodide:patch:jupyter-lite.json
10:41:34.74 >>> Re-enter generator PyodideAddon.post_build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 117
10:41:34.74 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x000001B408A40AC0>
10:41:34.74 .............. manager = <jupyterlite.manager.LiteManager object at 0x000001B406164DC0>
10:41:34.74 .............. jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
10:41:34.74 .............. output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
10:41:34.74  117 |         yield dict(
10:41:34.74 <<< Return value from PyodideAddon.post_build: None
.  post_build:federated_extensions:patch
.  post_build:mathjax:patch
-- post_build:pyodide:patch:jupyter-lite.json
serve:tornado
.  serve:serve:tornado
[LiteServeApp] WARNING |

        Serving JupyterLite Debug Server from:
            D:\code\python\jupyterlite\test\_output
        on:
            http://127.0.0.1:8000/index.html

        *** Exit by: ***
            - Pressing Ctrl+C
            - Visiting /shutdown

[LiteServeApp] WARNING | Stopping http://127.0.0.1:8000/

D:\code\python\jupyterlite\test>rm -rf .cache\ _output\

D:\code\python\jupyterlite\test>jupyter lite serve --pyodide="D:\Downloads\pyodide-build-0.19.1.tar.bz2" --mathjax-dir=MathJax-2.7.5
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.1.0-beta.3.tgz 8MB
    output:          D:\code\python\jupyterlite\test\_output
    lite dir:        D:\code\python\jupyterlite\test
    apps:
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
lite:jupyter-lite.json
mathjax:status
10:42:36.59 >>> Start generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 52
10:42:36.59 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:42:36.59 .......... manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:42:36.59   52 |     def status(self, manager):
10:42:36.59   54 |         yield dict(
10:42:36.59   55 |             name="pyodide",
10:42:36.59   57 |                 lambda: print(
10:42:36.59   60 |                 lambda: print(f" archive: {[*self.pyodide_cache.glob('*.bz2')]}"),
10:42:36.59   61 |                 lambda: print(
10:42:36.59   64 |                 lambda: print(
10:42:36.59   56 |             actions=[
10:42:36.59   54 |         yield dict(
10:42:36.59 <<< Yield value from PyodideAddon.status: {'name': 'pyodide', 'actions': [<function PyodideAddon.status.<locals>.<lambda> at 0x0000025C749FCCA0>, <function PyodideAddon.status.<locals>.<lambda> at 0x0000025C749FCD30>, <function PyodideAddon.status.<locals>.<lambda> at 0x0000025C749FCE50>, <function PyodideAddon.status.<locals>.<lambda> at 0x0000025C749FCEE0>]}
pyodide:pyodide
10:42:36.59 >>> Re-enter generator PyodideAddon.status in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 54
10:42:36.59 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:42:36.59 .............. manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:42:36.59   54 |         yield dict(
10:42:36.59 <<< Return value from PyodideAddon.status: None
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteServeApp] No archive (yet): test-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:lite:jupyter-lite.json
[LiteServeApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mathjax:status
     jupyter-server-mathjax: None
     configured MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
     effective MathJax dir: D:\code\python\jupyterlite\test\MathJax-2.7.5
.  status:pyodide:pyodide
     URL: D:\Downloads\pyodide-build-0.19.1.tar.bz2
 archive: []
   cache: 0 files
   local: 0 files
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 0 files
static:output_dir
-- pre_init:static:output_dir
static:unpack
.  init:static:unpack
10:42:42.96 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 71
10:42:42.96 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:42:42.96 .......... manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:42:42.96   71 |     def post_init(self, manager):
10:42:42.96   73 |         if manager.pyodide_url is None:
10:42:42.96   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    10:42:42.96 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 176
    10:42:42.96 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
    10:42:42.96 .......... path_or_url = 'D:\\Downloads\\pyodide-build-0.19.1.tar.bz2'
    10:42:42.96  176 |     def cache_pyodide(self, path_or_url):
    10:42:42.96  178 |         if re.findall(r"^https?://", path_or_url):
    10:42:42.96  192 |             local_path = (self.manager.lite_dir / path_or_url).resolve()
    10:42:42.96 .................. local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
    10:42:42.96  193 |             dest = self.pyodide_cache / PYODIDE
    10:42:42.96 .................. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:42:42.96  195 |         if local_path.is_dir():
    10:42:42.96  204 |         elif local_path.exists() or will_fetch:
    10:42:42.96  205 |             suffix = local_path.suffix
    10:42:42.96 .................. suffix = '.bz2'
    10:42:42.96  206 |             extracted = self.pyodide_cache / PYODIDE
    10:42:42.96 .................. extracted = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:42:42.96  208 |             if suffix == ".bz2":
    10:42:42.96  209 |                 yield from self.extract_pyodide(local_path, extracted)
        10:42:42.96 >>> Start generator PyodideAddon.extract_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 215
        10:42:42.96 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
        10:42:42.96 .......... local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
        10:42:42.96 .......... dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        10:42:42.96  215 |     def extract_pyodide(self, local_path, dest):
        10:42:42.96  218 |         def _extract():
        10:42:42.96  224 |         task = dict(
        10:42:42.96  225 |             name="extract:pyodide",
        10:42:42.96  226 |             file_dep=[local_path],
        10:42:42.96  228 |                 doit.tools.config_changed(
        10:42:42.96  229 |                     dict(no_sourcemaps=self.manager.no_sourcemaps)
        10:42:42.96  228 |                 doit.tools.config_changed(
        10:42:42.96  227 |             uptodate=[
        10:42:42.96  234 |                 dest / PYODIDE / PYODIDE_JS,
        10:42:42.96  235 |                 dest / PYODIDE / PYODIDE_PACKAGES,
        10:42:42.97  232 |             targets=[
        10:42:42.97  237 |             actions=[_extract],
        10:42:42.97  224 |         task = dict(
        10:42:42.97 .............. task = {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x0000025C74A06CB0>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
        10:42:42.97 .............. len(task) = 5
        10:42:42.97  240 |         yield task
        10:42:42.97 <<< Yield value from PyodideAddon.extract_pyodide: {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x0000025C74A06CB0>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
    10:42:42.97  209 |                 yield from self.extract_pyodide(local_path, extracted)
    10:42:42.97 <<< Return value from PyodideAddon.cache_pyodide: {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x0000025C74A06CB0>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
10:42:42.97   76 |         yield from self.cache_pyodide(manager.pyodide_url)
10:42:42.97 <<< Return value from PyodideAddon.post_init: {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x0000025C74A06CB0>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
pyodide:extract:pyodide
10:42:42.97 >>> Start generator PyodideAddon.post_init in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 76
10:42:42.97 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:42:42.97 .............. manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:42:42.97   76 |         yield from self.cache_pyodide(manager.pyodide_url)
    10:42:42.97 >>> Start generator PyodideAddon.cache_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 209
    10:42:42.97 ...................... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
    10:42:42.97 ...................... path_or_url = 'D:\\Downloads\\pyodide-build-0.19.1.tar.bz2'
    10:42:42.97 ...................... suffix = '.bz2'
    10:42:42.97 ...................... extracted = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:42:42.97 ...................... dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
    10:42:42.97 ...................... local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
    10:42:42.97  209 |                 yield from self.extract_pyodide(local_path, extracted)
        10:42:42.97 >>> Re-enter generator PyodideAddon.extract_pyodide in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 240
        10:42:42.97 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
        10:42:42.97 .............. local_path = WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')
        10:42:42.97 .............. dest = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide')
        10:42:42.97 .............. _extract = <function PyodideAddon.extract_pyodide.<locals>._extract at 0x0000025C749FD900>
        10:42:42.97 .............. task = {'name': 'extract:pyodide', 'file_dep': [WindowsPath('D:/Downloads/pyodide-build-0.19.1.tar.bz2')], 'uptodate': [<doit.tools.config_changed object at 0x0000025C74A06CB0>], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/pyodide.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/packages.json')], ...}
        10:42:42.97 .............. len(task) = 5
        10:42:42.97  240 |         yield task
        10:42:42.97 <<< Return value from PyodideAddon.extract_pyodide: None
    10:42:42.97  209 |                 yield from self.extract_pyodide(local_path, extracted)
    10:42:42.97 <<< Return value from PyodideAddon.cache_pyodide: None
10:42:42.97   76 |         yield from self.cache_pyodide(manager.pyodide_url)
10:42:42.97 <<< Return value from PyodideAddon.post_init: None
.  post_init:pyodide:extract:pyodide
federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
.  pre_build:federated_extensions:copy:ext:@voila-dashboards/jupyterlab-preview
mathjax:copy
10:43:04.87 >>> Start generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 78
10:43:04.87 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:43:04.87 .......... manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:43:04.87   78 |     def build(self, manager):
10:43:04.87   80 |         cached_pyodide = self.pyodide_cache / PYODIDE / PYODIDE
10:43:04.87 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:43:04.87   82 |         the_pyodide = None
10:43:04.87   84 |         if self.well_known_pyodide.exists():
10:43:04.87   86 |         elif manager.pyodide_url is not None:
10:43:04.87   87 |             the_pyodide = cached_pyodide
10:43:04.87 .................. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:43:04.87   89 |         if not the_pyodide:
10:43:04.87   92 |         file_dep = [
10:43:04.87   94 |             for p in the_pyodide.rglob("*")
10:43:04.87   92 |         file_dep = [
    10:43:04.87 List comprehension:
    10:43:04.87   92 |         file_dep = [
    10:43:05.52 .............. Iterating over <generator object Path.rglob at 0x0000025C74A02420>
    10:43:05.52 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
    10:43:05.52 .............. Values of p: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')
    10:43:05.52 Result: [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:43:05.52   92 |         file_dep = [
10:43:05.52 .............. file_dep = [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:43:05.52 .............. len(file_dep) = 303
10:43:05.52   98 |         yield dict(
10:43:05.52   99 |             name="copy:pyodide",
10:43:05.52  100 |             file_dep=file_dep,
10:43:05.52  101 |             targets=[
10:43:05.52  102 |                 self.output_pyodide / p.relative_to(the_pyodide) for p in file_dep
10:43:05.52  101 |             targets=[
    10:43:05.52 List comprehension:
    10:43:05.52  101 |             targets=[
    10:43:05.62 .............. Iterating over <list_iterator object at 0x0000025C74A045E0>
    10:43:05.62 .............. Values of self: <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
    10:43:05.62 .............. Values of the_pyodide: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
    10:43:05.62 .............. Values of p: WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/astropy.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizOneSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')
    10:43:05.62 Result: [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:43:05.62  101 |             targets=[
10:43:05.62  104 |             actions=[(self.copy_one, [the_pyodide, self.output_pyodide])],
10:43:05.62   98 |         yield dict(
10:43:05.62 <<< Yield value from PyodideAddon.build: {'name': 'copy:pyodide', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')], 'targets': [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/fonts/STIXSizTwoSymReg.ttf')], 'actions': [(<bound method PyodideAddon.copy_one of <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>>, [...])]}
pyodide:copy:pyodide
10:43:05.62 >>> Re-enter generator PyodideAddon.build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 98
10:43:05.62 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:43:05.62 .............. manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:43:05.62 .............. cached_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:43:05.62 .............. file_dep = [WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/api.d.ts'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.data'), WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide/asciitree.js'), ..., WindowsPath('D:/code/python/jupyterlite/test/.ca...de/pyodide/pyodide/fonts/STIXSizThreeSymReg.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymBol.ttf'), WindowsPath('D:/code/python/jupyterlite/test/.ca...dide/pyodide/pyodide/fonts/STIXSizTwoSymReg.ttf')]
10:43:05.62 .............. len(file_dep) = 303
10:43:05.62 .............. the_pyodide = WindowsPath('D:/code/python/jupyterlite/test/.cache/pyodide/pyodide/pyodide')
10:43:05.62   98 |         yield dict(
10:43:05.62 <<< Return value from PyodideAddon.build: None
translation:copy
.  build:mathjax:copy
.  build:pyodide:copy:pyodide
.  build:translation:copy
federated_extensions:patch
mathjax:patch
10:43:35.65 >>> Start generator PyodideAddon.post_build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 108
10:43:35.65 .......... self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:43:35.65 .......... manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:43:35.65  108 |     def post_build(self, manager):
10:43:35.65  110 |         if not self.well_known_pyodide.exists() and manager.pyodide_url is None:
10:43:35.65  113 |         jupyterlite_json = manager.output_dir / JUPYTERLITE_JSON
10:43:35.65 .............. jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
10:43:35.65  115 |         output_js = self.output_pyodide / PYODIDE_JS
10:43:35.65 .............. output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
10:43:35.65  117 |         yield dict(
10:43:35.65  118 |             name=f"patch:{JUPYTERLITE_JSON}",
10:43:35.65  119 |             doc=f"ensure {JUPYTERLITE_JSON} includes any piplite wheels",
10:43:35.65  120 |             file_dep=[output_js],
10:43:35.65  123 |                     self.patch_jupyterlite_json,
10:43:35.65  124 |                     [jupyterlite_json, output_js],
10:43:35.65  122 |                 (
10:43:35.65  121 |             actions=[
10:43:35.65  117 |         yield dict(
10:43:35.65 <<< Yield value from PyodideAddon.post_build: {'name': 'patch:jupyter-lite.json', 'doc': 'ensure jupyter-lite.json includes any piplite wheels', 'file_dep': [WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')], 'actions': [(<bound method PyodideAddon.patch_jupyterlite_json of <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>>, [...])]}
pyodide:patch:jupyter-lite.json
10:43:35.65 >>> Re-enter generator PyodideAddon.post_build in File "C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python310\lib\site-packages\jupyterlite\addons\pyodide.py", line 117
10:43:35.65 .............. self = <jupyterlite.addons.pyodide.PyodideAddon object at 0x0000025C64960AC0>
10:43:35.65 .............. manager = <jupyterlite.manager.LiteManager object at 0x0000025C620A4DC0>
10:43:35.65 .............. jupyterlite_json = WindowsPath('D:/code/python/jupyterlite/test/_output/jupyter-lite.json')
10:43:35.65 .............. output_js = WindowsPath('D:/code/python/jupyterlite/test/_output/static/pyodide/pyodide.js')
10:43:35.65  117 |         yield dict(
10:43:35.65 <<< Return value from PyodideAddon.post_build: None
.  post_build:federated_extensions:patch
.  post_build:mathjax:patch
-- post_build:pyodide:patch:jupyter-lite.json
serve:tornado
.  serve:serve:tornado
[LiteServeApp] WARNING |

        Serving JupyterLite Debug Server from:
            D:\code\python\jupyterlite\test\_output
        on:
            http://127.0.0.1:8000/index.html

        *** Exit by: ***
            - Pressing Ctrl+C
            - Visiting /shutdown

[LiteServeApp] WARNING | Stopping http://127.0.0.1:8000/

D:\code\python\jupyterlite\test>

But the directory of cached pyodide is too deep, In my computer, it is D:\code\python\jupyterlite\test\.cache\pyodide\pyodide\pyodide\. Maybe we should shorten it to some like D:\code\python\jupyterlite\test\.cache\pyodide\

@liudonghua123
Copy link
Author

I updated the pr, and tested with url, bz2, directory.

@lesteve
Copy link

lesteve commented Feb 3, 2023

I confirm this is still an issue. The --pyodide argument doc claims "allows for fetching either a compressed pyodide .bz2, or folder containing such an archive’s contents." but providing a folder actually does not work with a similar error as the top message in this issue.

Here is a snippet that reproduces

# Download and extract latest pyodide release archive
wget https://github.com/pyodide/pyodide/releases/download/0.22.1/pyodide-core-0.22.1.tar.bz2
tar xvf pyodide-core-0.22.1.tar.bz2
jupyter lite build --pyodide pyodide

On the other hand providing a .tar.bz2 works fine:

jupyter lite build --pyodide pyodide-core-0.22.1.tar.bz2

jupyterlite/jupyterlite#568 was an attempt at fixing this issue but I have not managed to test it in less than 15 minutes of effort ...

Here is the traceback when trying to use --pyodide <folder>:

Traceback (most recent call last):
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/site-packages/doit/action.py", line 461, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/site-packages/jupyterlite/addons/base.py", line 90, in copy_one
    shutil.copy2(src, dest)
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test/.cache/pyodide/pyodide/pyodide'
Full output
static:jupyter-lite.json
.  pre_status:static:jupyter-lite.json
    tarball:         jupyterlite-app-0.1.0-beta.18.tgz 7MB
    output:          /tmp/test/_output
    lite dir:        /tmp/test
    apps:            
    sourcemaps:      True
    unused packages: True
archive:archive
contents:contents
lite:jupyter-lite.json
mathjax:status
mimetypes:jupyter-lite.json
pyodide:pyodide
serve:contents
settings:overrides
translation:translation
.  status:archive:archive
[LiteBuildApp] No archive (yet): test-jupyterlite.tgz
.  status:contents:contents
    contents: 0 files
.  status:lite:jupyter-lite.json
[LiteBuildApp]     jupyter-lite.(json|ipynb): 0 files
.  status:mathjax:status
     jupyter-server-mathjax: None 
     configured MathJax dir: /tmp/test/traitlets.Undefined
     effective MathJax dir: None
.  status:mimetypes:jupyter-lite.json
    filetypes:         26 
.  status:pyodide:pyodide
     URL: pyodide
 archive: []
   cache: 0 files
   local: 0 files
.  status:serve:contents
    url: http://127.0.0.1:8000/
    server: tornado
    headers:
.  status:settings:overrides
    overrides.json: 0
.  status:translation:translation
    translation files: 0 files
static:output_dir
.  pre_init:static:output_dir
static:unpack
.  init:static:unpack
src=PosixPath('/tmp/tmpl04xv6sw/package')
dest=PosixPath('/tmp/test/_output')
local_path=PosixPath('/tmp/test/pyodide')
local_path.name='pyodide'
pyodide:copy:pyodide:pyodide
.  post_init:pyodide:copy:pyodide:pyodide
src=PosixPath('/tmp/test/pyodide')
dest=PosixPath('/tmp/test/.cache/pyodide/pyodide')
federated_extensions:copy:ext:jupyterlab-jupytext
federated_extensions:copy:ext:jupyterlab_pygments
federated_extensions:copy:ext:jupyterlab-plotly
federated_extensions:copy:ext:@jupyter-widgets/jupyterlab-manager
.  pre_build:federated_extensions:copy:ext:jupyterlab-jupytext
src=PosixPath('/home/lesteve/miniconda3/envs/jupyterlite/share/jupyter/labextensions/jupyterlab-jupytext')
dest=PosixPath('/tmp/test/_output/extensions/jupyterlab-jupytext')
.  pre_build:federated_extensions:copy:ext:jupyterlab_pygments
src=PosixPath('/home/lesteve/miniconda3/envs/jupyterlite/share/jupyter/labextensions/jupyterlab_pygments')
dest=PosixPath('/tmp/test/_output/extensions/jupyterlab_pygments')
.  pre_build:federated_extensions:copy:ext:jupyterlab-plotly
src=PosixPath('/home/lesteve/miniconda3/envs/jupyterlite/share/jupyter/labextensions/jupyterlab-plotly')
dest=PosixPath('/tmp/test/_output/extensions/jupyterlab-plotly')
.  pre_build:federated_extensions:copy:ext:@jupyter-widgets/jupyterlab-manager
src=PosixPath('/home/lesteve/miniconda3/envs/jupyterlite/share/jupyter/labextensions/@jupyter-widgets/jupyterlab-manager')
dest=PosixPath('/tmp/test/_output/extensions/@jupyter-widgets/jupyterlab-manager')
pyodide:copy:pyodide
translation:copy
.  build:pyodide:copy:pyodide
src=PosixPath('/tmp/test/.cache/pyodide/pyodide/pyodide')
dest=PosixPath('/tmp/test/_output/static/pyodide')
TaskError - taskid:build:pyodide:copy:pyodide
PythonAction Error
Traceback (most recent call last):
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/site-packages/doit/action.py", line 461, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/site-packages/jupyterlite/addons/base.py", line 90, in copy_one
    shutil.copy2(src, dest)
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/lesteve/miniconda3/envs/jupyterlite/lib/python3.10/shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test/.cache/pyodide/pyodide/pyodide'

@jtpio jtpio transferred this issue from jupyterlite/jupyterlite Apr 7, 2023
@tomjakubowski
Copy link

tomjakubowski commented May 10, 2023

@lesteve I was seeing an error like this when using a directory with --pyodide too:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test/.cache/pyodide/pyodide/pyodide'

I found that the problem in my case was directory structure. I had the pyodide's dist in a folder like this:

foo-pyodide/pyodide.js
foo-pyodide/pyodide.asm.js
...

and was building with jupyter lite build --pyodide foo-pyodide/. The build failed with the above error.

I made a new directory foo-pyodide/pyodide/, moved the pyodide dist in there, and then again passed --pyodide foo-pyodide/. This worked as expected.

In other words, I think --pyodide expects to be pointed to a directory with a subdirectory called pyodide containing the files from the dist, not to the directory containing the dist itself.

NB: I saw the same problem when using a .tar.bz2 with the wrong directory structure too.

@lesteve
Copy link

lesteve commented May 10, 2023

@tomjakubowski thanks the work-around!

Having said that it is not super intuitive and hopefully this can be improved at one point for example:

  • by improving the error message
  • by being a bit more flexible and not relying on having a nested folder called "pyodide"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants