-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket Gateway exited... without pressing ctl+c #46
Comments
I am assuming you are trying this with the old Scratch Pico board and not the new Raspberry Pi Pico. |
What versions of Python are you using on your Ubuntu machine and on your Windows machine? |
Thanks for providing that information. I have a couple of ideas, but I am unable to test them because I do not own a Pico board. I developed the code for a group in Taiwan a few years back and they did all the testing during development. I do not know if you are using a Sparkfun board or not. It is possible that the Sparkfun board is using different hardware than used in the Taiwan clones. Also, they tested with Python 3.8. Originally, they were using Python 3.7 on Windows, but when Python 3.8 came out and was installed, it broke things. Python changed asyncio in Python 3.8 for Windows. I put some workaround code for Windows to fix the issue. Since you are seeing the issue both on Windows and Ubuntu, most likely Python 3.9 is not the cause, but I can't be sure. I do not run Python 3.9 as of yet, so I have no experience with it. It appears that perhaps the polling loop used in the pico gateway is running too quickly and flooding things. Adding a short delay may solve the issue. But before I create a branch and make any coding changes, it would be very helpful to find out why the WebSocket gateway is crashing. I am not sure if this will provide any useful clues or not, but without knowing if a useful exception is being thrown when the WebSocket gateway crashes, it is very hard to provide a fix without totally guessing. If you could run the troubleshooting scenario, mentioned in a previous posting, when the WebSocket gateway crashes, it should provide an exception traceback in its command window. Again, it may or may not be helpful, but at least it should show where things went wrong by indicating the line of code where the crash occurred. If you copy the traceback and paste it into this thread, I will be happy to analyze what might be going wrong for you. Also, if there is an exception thrown in the other command windows, if you could provide those as well, it would be of great help. Thanks. |
I have not heard back from you, so I am closing this issue. If you wish to pursue it, please let me know and I can reopen it. |
The Picoboard lights up for a second, then turns off again when the program exits. The board is fine, It works with my python script.
The text was updated successfully, but these errors were encountered: