-
Notifications
You must be signed in to change notification settings - Fork 19
scipy.misc is missing data files #79
Comments
Thanks for opening an issue. Indeed xeus-python will filter out those files when packing the environment with empack (for reducing the size of what gets downloaded in the page). If you don't want this behavior, you can provide your own copy of this file: https://github.com/emscripten-forge/recipes/blob/main/empack_config.yaml scipy:
include_patterns:
- pattern: '*.so'
- pattern: '*.py'
- pattern: '**/scipy/misc/*.dat'
exclude_patterns:
- pattern: '**/tests/**/*.py'
- pattern: '**/tests/**/*.so' Then you need to provide your own config file to xeus-python: We should document this properly at some point. But this is not tested properly yet, and the feature is still very much draft (we should be able to extend the default config instead of needing to replace it entirely). |
Thanks a lot, I'll try this! |
Specifying the empack_config file with additional include for scipy worked. Would it make sense to make a PR to the |
Those I yes, I personally believe this should not be fixed in the default config, but we could document how to fix it for people who want to use those example data. @DerThorsten what do you think? |
I would agree that |
Description
scipy.misc.face()
fails since it can not find the associated data file. There are other similar functions that are missing data files inscipy.misc
:scipy.misc.electrocardiogram()
andscipy.misc.ascent()
The package from emscripten-forge does contain the
.dat
files. but somehow they are not visible by the kernel.Reproduce
Open JupyterLite and start a new notebook with a xeus-python kernel.
This gives an error:
From the screenshot below, you can see that there are no
.dat
file in thescipy.misc
folder:This does work fine in a Pyodide kernel.
Expected behavior
No error
The text was updated successfully, but these errors were encountered: