-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Did a few very quick tests on windows:
OS: Windows_NT x64 10.0.26200 (Windows 11 25H2)
my initial findings :
- no port detection
- no repl
- no basic file commands
Setup:
Tests are using uvx to avoid needing to clone / install ,
but that should not behave any different.
-
one device connected
-
mpytool repl
No serial port found. Use -p to specify port. -
mpytool -p COM8 repl
REPL not available on this platform -
mpytool -p COM8 ls
Slew of errors - likely due to assumption that filedescriptors are available on all platforms.
Based on this I expect many many more errors that would require extensive testing and debugging that I do not (almost not) have to worry about when using mpremote
PS D:\mypython> mpremote
Connected to MicroPython at COM8
Use Ctrl-] or Ctrl-x to exit this shell
MicroPython v1.27.0 on 2025-12-09; Wio Terminal D51R with SAMD51P19A
Type "help()" for more information.
>>>
>>>
PS D:\mypython> uvx git+https://github.com/pavelrevak/mpytool repl
No serial port found. Use -p to specify port.
PS D:\mypython> uvx git+https://github.com/pavelrevak/mpytool -p COM8 repl
REPL not available on this platform
PS D:\mypython> uvx git+https://github.com/pavelrevak/mpytool -p COM8 ls
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Scripts\mpytool.exe\__main__.py", line 10, in <module>
sys.exit(main())
~~~~^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpytool.py", line 1552, in main
_run_commands(mpy_tool, command_groups, with_progress=(args.verbose >= 1))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpytool.py", line 1425, in _run_commands
mpy_tool.process_commands(command_groups[i], is_last_group=is_last)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpytool.py", line 1370, in process_commands
dispatch(commands, is_last_group)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpytool.py", line 1171, in _dispatch_ls
result = self._mpy.ls(path)
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpy.py", line 216, in ls
self.import_module('os')
~~~~~~~~~~~~~~~~~~^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpy.py", line 186, in import_module
self._mpy_comm.exec(f'import {module}')
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpy_comm.py", line 156, in exec
self.enter_raw_repl()
~~~~~~~~~~~~~~~~~~~^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpy_comm.py", line 101, in enter_raw_repl
while not self.stop_current_operation():
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\mpy_comm.py", line 87, in stop_current_operation
self._conn.read_until(b'\r\n>>> ', timeout=0.2)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\conn.py", line 98, in read_until
if self._read_to_buffer(wait_timeout=0.001):
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\conn.py", line 47, in _read_to_buffer
if self._has_data(wait_timeout):
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\conn.py", line 27, in _has_data
fd = self.fd
^^^^^^^
File "D:\.cache\uv\archive-v0\IIkjvpoKgTtOT9f8rgymS\Lib\site-packages\mpytool\conn_serial.py", line 27, in fd
return self._serial.fd if self._serial else None
^^^^^^^^^^^^^^^
AttributeError: 'Serial' object has no attribute 'fd'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels