Closed kenjican closed 2 years ago
Have the same problem, works fine in popOs 20.04 (Pyserial 3.4, Python 3.8) with 0.9.1. But didn't work on Arch Linux machine (Pyserial 3.5, Python 3.9.6). pip3 list shows 0.9.2, uninstalled that then 'sudo pip3 install mpfshell==0.9.1' Now works fine on Arch (I didn't try 0.9.2 on popOS to see if it breaks).
I have the same issue with 0.9.2. Falling back to 0.9.1 works.
MacOS 11.6 Python 3.9
I found the reason. cmd.Cmd.cmdloop
uses return value from do_*
as a flag for stop(source code here), which cause the loop to exit if True.
Before https://github.com/wendlers/mpfshell/commit/190bc7557d7c8bf72947c1fff212301962fe031d, the return value was None
and after that, successfully opening a connection returns True
which causes the cmdloop
to exit. I'd suggest to use a better approach to expose the connection status.
Thank you, @hyx0329! Would you be interested in submitting a PR?
execute mpfshell, open ttyUSB0 , it shows connected and then exit mpfshell. I used to upload files with version 0.9.1 ,it works well.
OS: LinuxMint 20.2 Python 3.8 Pyseiral 3.5