I have setup PyCharm Professional 2020.3 for remote debuging on my Raspberry Pi 3B+.
I have one instance of Octoprint running in normal mode. (I tried to shut it down but that also seems to turn off the WiFi so I couldn't connect to the Pi.)
When I run Octoprint 1.5.2 in debug mode I will get the following error:
Both servers responds OK when I connect to them from my browser (using port 5000 and 5001 respectively). The only difference I can see is that, the one in dubug mode, do not report the Octoprint version at the bottom left. It says "OctoPrint 0+unknown".
Check that absolutely everything in the OctoPrint source is deployed when remote debugging, since it looks like it might be confused between whether it is running the codebase of 1.4.2 somewhere, with 1.5.x added in to the mix (but not fully).
I don't run with this setup since it was too fiddly, I installed OctoPrint outside the deployment and only deploy my plugins to that install rather than have it all deployed.
Yes, I was a bit worried that there were some missmatch between what I have in my dev project and what is running on my Pi.
I have updated my Octoprint project from github which means I shuold have the latest version 1.5.2 in my PyCharm Octoprint development project.
I thougt that, when I start the debugger it should also update my Raspberry Pi so it will be sychronezsed with my develoment project. Isn't that how it is supposed to work? I have also updated the "normal OctoPrint" installation to 1.5.2 on my Pi (running in parallell with my debug version).
My local venv is Python 3.8. Could that be a problem?
Is there a way to force sychronization in PyCharm?
You wrote that you have a different setup. Sorry, but I do not understand how you have done that.
You say you installed OctoPrint outside the deployment. I do have Octoprint installaed on my Pi, but from ealier posts (from Gina I think) I got the impression that I could not use that.
Could you please be a little more specific on how you have set it up?
Problem solved. I started all over, deleted my OctoPrint project and made a new clone from github.
Now I could setup remote debugging and run it without errors.
I was also able to fix the problem in my BrightPi plugin.
I do however have one question about one line of code in OctoPrints setup.py.
# we test against 2.7, 3.6 and 3.7, so that's what we'll mark as supported
PYTHON_REQUIRES = ">=2.7.9, !=3.0., !=3.1., !=3.2., !=3.3., !=3.4., !=3.5., <4"
Doesn't this also include version 3.8.x that I have installed on my desktop?
I have seen this warning in the log
2020-12-15 07:12:52,908 - py.warnings - WARNING - /home/pi/oprint/lib/python3.7/site-packages/tornado/httputil.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
.
Is this a bug in OctoPrint or is it me that have missed to update?
OctoPrint 1.5.x is fully compatible with the latest Python versions, I have tested Python 3.7, 3.8 and 3.9. The CI test suite is run against Py2.7, 3.7 & 3.8 so that comment is a little outdated, and Py3.9 was only just released in October so 1.5.x is the first version to technically support it, even though other might do we just haven't tested it,
TL;DR you are just fine on Py3.8.
That's a depreciation warning, which actually still shows up in 3.9 saying it will be removed in 3.10, so obviously the Python developers changed their mind there. We try and catch all of these & fix them but it is usually dependencies that need updates (as that one is), don't worry, nothing is broken