emmatyping / python-wasm

Build scripts and configuration for building CPython for Emscripten
https://repl.ethanhs.me
679 stars 35 forks source link

ModuleNotFoundError: No module named 'urllib' #51

Closed hyzyla closed 2 years ago

hyzyla commented 2 years ago

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'
>>> 
emmatyping commented 2 years ago

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 2 years ago

I'll push a fix for help later tonight.