Can't load python file using paths

I saw the message about loading multiple python files. However I have been unable to get it to load even one file. I can load a python file using but I noticed one can’t load multiple files this way as they overwrite each other. I tried the path solution but I can’t get it to work:

paths = ['./']

I also just tried paths = [‘’]

I’m pulling the python file from a page if that matters. The error message I get is the following when I try to import myadd

Traceback (most recent call last):
File “/lib/python3.10/site-packages/_pyodide/”, line 435, in eval_code
.run(globals, locals)
File “/lib/python3.10/site-packages/_pyodide/”, line 304, in run
coroutine = eval(self.code, globals, locals)
File “”, line 2, in
ModuleNotFoundError: No module named ‘myadd’

1 Like

HI @hsauro, and welcome to the forum!

As of version 2022.12.1, the paths syntax has been deprecated in favor of the more powerful [[fetch]] configurations. Fetch (a new table in py-config) allows for loading multiple files, and load them into different places in the emscripten virtual file system if desired.

See the fetch section of the py-config documentation for more details, or this section of my recent release writeup for a more narrative description with examples.

1 Like