sinricpro / micropython-sinricpro-sdk

Micropython SinricPro SDK
6 stars 1 forks source link

it shows module not found uasyncio #1

Open kritishmohapatra opened 1 month ago

kakopappa commented 1 month ago

hello uasyncio is part of micropython https://docs.micropython.org/en/v1.14/library/uasyncio.html

you can check whether it's there in REPL:

help('modules')

kritishmohapatra commented 1 month ago

I used thony and my micropython's version is v1.22.2 and in the repl there is no module uasyncio Screenshot (532)

kritishmohapatra commented 1 month ago

when a run the example file of sinric pro it says File "main.py", line 1, in File "/lib/sinricpro/init.py", line 1, in File "/lib/sinricpro/async_websocket_client.py", line 7, in ImportError: no module named 'uasyncio'

kritishmohapatra commented 1 month ago

When i want to install the micropythonlib-uasyncio fro thonys's package managers it shows error and this install --progress-bar off micropython-uasyncio Looking in indexes: http://127.0.0.1:36628 127.0.0.1 - - [17/Oct/2024 15:25:43] "GET /micropython-uasyncio/ HTTP/1.1" 200 - Collecting micropython-uasyncio

Exception occurred during processing of request from ('127.0.0.1', 54133) Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 586, in init super().init(request, client_address, server) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 747, in init self.handle() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 433, in handle self.handle_one_request() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 421, in handle_one_request method() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 593, in do_GET self._serve_file(*path.split("/")) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 625, in _serve_file file_content = downloader.get_file_content(dist_name, file_name) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 141, in get_file_content return self._tweak_file(dist_name, file_name, original_bytes) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 241, in _tweak_file assert metadata_bytes AssertionError

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-uasyncio/micropython-uasyncio-3.0.tar.gz/

Exception occurred during processing of request from ('127.0.0.1', 54135) Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 586, in init super().init(request, client_address, server) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 747, in init self.handle() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 433, in handle self.handle_one_request() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 421, in handle_one_request method() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 593, in do_GET self._serve_file(*path.split("/")) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 625, in _serve_file file_content = downloader.get_file_content(dist_name, file_name) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 141, in get_file_content return self._tweak_file(dist_name, file_name, original_bytes) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 241, in _tweak_file assert metadata_bytes AssertionError

WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-uasyncio/micropython-uasyncio-3.0.tar.gz/

Exception occurred during processing of request from ('127.0.0.1', 54137) Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 586, in init super().init(request, client_address, server) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 747, in init self.handle() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 433, in handle self.handle_one_request() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 421, in handle_one_request method() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 593, in do_GET self._serve_file(*path.split("/")) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 625, in _serve_file file_content = downloader.get_file_content(dist_name, file_name) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 141, in get_file_content return self._tweak_file(dist_name, file_name, original_bytes) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 241, in _tweak_file assert metadata_bytes AssertionError

WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-uasyncio/micropython-uasyncio-3.0.tar.gz/

Exception occurred during processing of request from ('127.0.0.1', 54139) Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 586, in init super().init(request, client_address, server) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 747, in init self.handle() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 433, in handle self.handle_one_request() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 421, in handle_one_request method() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 593, in do_GET self._serve_file(*path.split("/")) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 625, in _serve_file file_content = downloader.get_file_content(dist_name, file_name) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 141, in get_file_content return self._tweak_file(dist_name, file_name, original_bytes) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 241, in _tweak_file assert metadata_bytes AssertionError

WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-uasyncio/micropython-uasyncio-3.0.tar.gz/

Exception occurred during processing of request from ('127.0.0.1', 54141) Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 586, in init super().init(request, client_address, server) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 747, in init self.handle() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 433, in handle self.handle_one_request() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 421, in handle_one_request method() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 593, in do_GET self._serve_file(*path.split("/")) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 625, in _serve_file file_content = downloader.get_file_content(dist_name, file_name) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 141, in get_file_content return self._tweak_file(dist_name, file_name, original_bytes) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 241, in _tweak_file assert metadata_bytes AssertionError

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-uasyncio/micropython-uasyncio-3.0.tar.gz/

Exception occurred during processing of request from ('127.0.0.1', 54143) Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 586, in init super().init(request, client_address, server) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\socketserver.py", line 747, in init self.handle() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 433, in handle self.handle_one_request() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\http\server.py", line 421, in handle_one_request method() File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 593, in do_GET self._serve_file(*path.split("/")) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 625, in _serve_file file_content = downloader.get_file_content(dist_name, file_name) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 141, in get_file_content return self._tweak_file(dist_name, file_name, original_bytes) File "C:\Users\user\AppData\Local\Programs\Thonny\lib\site-packages\thonny\vendored_libs\pipkin\proxy.py", line 241, in _tweak_file assert metadata_bytes AssertionError

ERROR: Could not install packages due to an OSError: HTTPConnectionPool(host='127.0.0.1', port=36628): Max retries exceeded with url: /micropython-uasyncio/micropython-uasyncio-3.0.tar.gz/ (Caused by ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

Error Command '['C:\Users\user\AppData\Local\pipkin\cache\workspaces\8d92674775969d31dbced6a4fbc13868\Scripts\python.exe', '-I', '-m', 'pip', '--no-color', '--disable-pip-version-check', '--trusted-host', '127.0.0.1', 'install', '--no-compile', '--use-pep517', '--upgrade-strategy', 'only-if-needed', 'micropython-uasyncio', '--index-url', 'http://127.0.0.1:36628']' returned non-zero exit status 1.

kakopappa commented 1 month ago

Looks like a Thonny issue. There’s a similar issue reported here.

https://github.com/thonny/thonny/issues/2598