ethanhs/python-wasm

ModuleNotFoundError: No module named 'urllib'

hyzyla opened this issue · 2 comments

Tried to type help() in https://repl.ethanhs.me/ and received error:

Python 3.11.0a4+ (heads/main-dirty:c47c9e6, Jan 18 2022, 05:26:55) [Clang 14.0.0 (https://github.com/llvm/llvm-project f142c45f1e494f8dbdcc1bcf1412 on emscripten
Type "help", "copyright", "credits" or "license" for more information.
>>> help()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen _sitebuiltins>", line 102, in __call__
  File "/build/cpython/builddir/emscripten-browser/../../Lib/pydoc.py", line 72, in <module>
ModuleNotFoundError: No module named 'urllib'
>>> 

Hi!

Unfortunately the browser doesn't support synchronous network access, so urllib won't work. At some point down the road we can presumably fix help() not to require urllib.

tiran commented

I'll push a fix for help later tonight.