NabuCasa / sl-web-tools

Open source tools to allow working with USB-sticks containing SL chips in the browser
48 stars 6 forks source link

Web flasher broken due to missing dependency #11

Closed darkxst closed 10 months ago

darkxst commented 10 months ago

It seems the web flasher is broken again atm.

The following error occurs while connecting

Uncaught (in promise) PythonError: Traceback (most recent call last):
  File "/lib/python3.10/_pyodide/_base.py", line 460, in eval_code
    .run(globals, locals)
  File "/lib/python3.10/_pyodide/_base.py", line 304, in run
    coroutine = eval(self.code, globals, locals)
  File "<exec>", line 2, in <module>
  File "/lib/python3.10/site-packages/universal_silabs_flasher/flasher.py", line 15, in <module>
    from .gbl import GBLImage
  File "/lib/python3.10/site-packages/universal_silabs_flasher/gbl.py", line 8, in <module>
    from zigpy.ota.validators import parse_silabs_gbl
  File "/lib/python3.10/site-packages/zigpy/ota/__init__.py", line 23, in <module>
    import zigpy.ota.provider
  File "/lib/python3.10/site-packages/zigpy/ota/provider.py", line 14, in <module>
    import ssl
ModuleNotFoundError: The module 'ssl' is unvendored from the Python standard library in the Pyodide distribution.
You can install it by calling:
  await micropip.install("ssl") in Python, or
  await pyodide.loadPackage("ssl") in JavaScript
See https://pyodide.org/en/stable/usage/loading-packages.html for more details.

    at new_error (pyodide.asm.js:10:179954)
    at pyodide.asm.wasm:0xe78a8
    at pyodide.asm.wasm:0xe79ad
    at Module._pythonexc2js (pyodide.asm.js:10:928566)
    at Module.callPyObjectKwargs (pyodide.asm.js:10:123572)
    at Module.callPyObject (pyodide.asm.js:10:123781)
    at Function.apply (pyodide.asm.js:10:134751)
    at Object.apply (pyodide.asm.js:10:133745)
    at Object.runPython (pyodide.asm.js:10:161550)
    at Ne.onPyodideLoaded (flashing-dialog-a8f5f5ab.js?module:281:970)
    at Ne.selectSerialPort (flashing-dialog-a8f5f5ab.js?module:281:552)
darkxst commented 10 months ago

Seems it was from this commit, that introduced the ssl dependency: https://github.com/zigpy/zigpy/commit/8834ad405b42994706ab7ddf5ad1b26ad6dba8c3

puddly commented 10 months ago

Hmm. I'll fully pin all dependencies after fixing this.

darkxst commented 10 months ago

yes, good idea!

sblantipodi commented 10 months ago

can this be related to this issue? https://github.com/home-assistant/frontend/issues/19009

Illuminatus007a commented 10 months ago

Same problem here