If you know, please.
The following error appears during debugging with Fusion360 (2.0.7402) + VSCode python (ms-python-2019.9.34911) and operation becomes impossible.
(It is necessary to restart Fusion360.)
Exception in thread ptvsd.Server: Traceback (most recent call last): File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\ipcjson.py", line 269, in process_one_message msg = self.__message.pop(0) IndexError: pop from empty list During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\<UserName>\AppData\Local\Autodesk\webdeploy\production\9eb6e3e95b2f4cf7bb2f804604f4040b86fc00dd\Python\lib\threading.py", line 917, in _bootstrap_inner self.run() File "C:\Users\<UserName>\AppData\Local\Autodesk\webdeploy\production\9eb6e3e95b2f4cf7bb2f804604f4040b86fc00dd\Python\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\wrapper.py", line 536, in process_messages raise exc File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\wrapper.py", line 521, in process_messages self.process_messages() File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\ipcjson.py", line 258, in process_messages self.process_one_message() File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\ipcjson.py", line 272, in process_one_message self._wait_for_message() File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\ipcjson.py", line 154, in _wait_for_message line = self._buffered_read_line_as_ascii() File "C:\Users\<UserName>\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\ipcjson.py", line 113, in _buffered_read_line_as_ascii temp = self.__socket.recv(1024) socket.timeout: timed out
This suspends execution at a breakpoint, regardless of code, and appears after a certain period of time and becomes inoperable.
Do you have the same experience?
Is this relevant?
Thanks in advance.
Solved! Go to Solution.
Solved by BrianEkins. Go to Solution.
I could debug at home without any problems, so I knew that Update was not the cause.
I did not know how to deal with it, so I reinstalled Fusion360 after clean uninstall.
I'm working fine now.
After the update the other day, the same situation has come up again.
・Win10 Pro
・Fusion360 Ver2.0.8560
・VSCode Ver1.46.1
・ms-Pythpn Ver2020.6.90262
I reinstalled Fusion 360 again after a clean uninstall, but the situation remains the same.
Do you have the same situation?
Does anyone know how to deal with it?
I'm having the same problem. Something has changed in VS Code or the Python extension. I know Autodesk is investigating it.
Thanks @BrianEkins .
I was relieved to know that I was not the only one.
Unfortunately, older versions of ms-python cannot be installed.
Yes - I see the same on Macbook Pro too.
It looks like a timeout has been added (or catering for that exception has been removed) on the socket connection that gets made between Fusion360 and Visual-Studio-Code.
It might be the fault of...
a) Fusion360
b) VSCode
c) The debugging subsystem inside VSCode
Is anyone who is suffering this problem absolutely sure they have not updated either VSCode, or allowed it to update any of its own components?
Unfortunately, I went and installed a bunch of VSCode extensions for other reasons, so now I can't be sure where the problem came from.
Any updates on this?
I got in the same issue and can not debug my Fusion Extension anymore 😞
Please help...
I think I have found the solution.
I have installed an old version of ms-python.python-2020.5.78807 extension for VSCode because it works for me in another issue https://forums.autodesk.com/t5/fusion-360-api-and-scripts/not-able-to-debug-scripts-add-ins-in-visua...
It can be downloaded from Microsoft GitHub:
https://github.com/microsoft/vscode-python/releases/tag/2020.5.78807
PS: Do not forget to disable Extension Autoupdate otherwise it will stop working ideally after VSCOde update it to the latest version
One thing I tried was "doing things" a lot when in breakpoints - i.e. - forcing the socket to do at least some communications frequently (e.g. using the command-line to show the contents of a variable) - this at least seemed to keep it open and working for slightly longer.
Hmm. Is there a way to run "loops" on the commandline? That could possibly work to automatically force it not to time-out?
One thing I attempted with no luck: I've been testing on a heap of different platforms, so I had some machines that had not been updated (but without VSCode on them unfortunately) - I attempted to copy all the old fusion code off those - Fusion (old version) ran fine - but the timeout problem was still there.
I next copied a pile of old VSCode stuff off a different PC to see if the problem was in there - also didn't fix it.
I also found old versions of all the modules that show up in the errors, and put all those back - didn't fix it either.
Ideas I've not investigated... try to find out what socket it's using (e.g. maybe it's TCP, or a native OS one), and run some other process on my box to send junk at the socket in a loop, with a small sleep inbetween: in theory, it might keep something open (long shot - it's probably an established connection timing-out, and if it's TCP, that would make new connections...)
Are there any VSCode add-ins or tools or other utilities that might cause socket traffic? (timing things, or memory watchers, or IO monitors, or anything...) using things stops them timing out...
I've got other things to keep me occupied while I wait for them to fix this, so I've got no need to dive in and fix the bug myself - but if anyone really needs me to do that, shout out and I'll have a go.
Tantalizing hints!!
What version number should we see after following your instructions?
I did all the above, but I still see the problem [on mac] 😞
the ms-python-release.vsix you linked gave me this one:-
@akonovalenko Thank you very much for the valuable information.
I tried it immediately, but ms-python2020.5.78807 didn't solve it.
Just in case, I also tried ms-python 2019.9.34911, but the situation did not change.
I fussed around with PTVSD SOCKET TIMEOUT and the bug symptoms, but that seems to be the wrong idea.
It looks like one end is telling the other end to expect N packets, but it only sending N-1 and that's the root cause of the empty-pop which causes the "wait for another message" which eventually triggers the timeout 😞
I can't tell if the problem is Fusion360 or vscode or the PTVSD subsystem - and while I usually keep great backups, I don't have anything that's not suffered its own update unfortunately (curse that auto-update option in vscode!!!)
This has been fixed in the latest fixes update this week.
Earlier, I also had problems with Intellisense in VS Code but that also seems to be working now as of the last couple of weeks. It had always worked on one of my computers and never worked on the other but now it's working on both of them. Is anyone else having issues with Intellisense in VS Code?
Thanks @BrianEkins .
The problem seems to be solved.
・Win10 Pro
・Fusion360 Ver2.0.8624
・VSCode Ver1.47.1
・ms-Pythpn Ver2020.6.91350
Intellisense is also working for me.
The problem was solved in my environment, too.
Thank you so much!
Can't find what you're looking for? Ask the community or share your knowledge.