Whenever i download the micropython uf2 file from Thonny and wait for it to reboot i get this message: Unable to connect to COM4: could not open port 'COM4': PermissionError(13, 'Access is denied.', None, 5)

If you have serial connection to the device from another program, then disconnect it there first.

Backend terminated or disconnected. Use 'Stop/Restart' to restart.

  • that is your specific question?
    – jsotola
    Commented Jun 10, 2022 at 17:17
  • How do i fix it?
    – Andreas
    Commented Jun 10, 2022 at 20:20
  • it is unclear what problem you are trying to solve ... your post looks like it has been copied from a forum because it includes what looks like two comments from other people ... COM4 is a serial port on a windows OS ... why are you posting about a possible windows problem at a Raspberry Pi site?
    – jsotola
    Commented Jun 11, 2022 at 0:18
  • I am using Window 11 Thonny. My Win PC has a couple of USB cables. Often I forget which cable for which Pico. If I connect the wrong cable, then I get error messages such as "unable to connect to Port x, ..."
    – tlfong01
    Commented Jun 11, 2022 at 3:00

2 Answers 2


This appears to be an issue with Thonny 1.3.3 or something else has impacted same recently.

Thonny 1.3.3, which is the latest packaged for Windows version even though 1.3.4 is apparently current on github and there is an even a newer version in alpha release on github. I frequency get the 'Unable to connect to COM: port not found error now as well. This started happening to me just in the last few days. Before that, I could have Thonny connected to my Pico W for hours without issue, it seems to happen almost after every debug/code run now. Clearly something changed recently, just not sure what or where. On my Windows 11 Pro based desktop there were several windows update packages installed, one of them maybe the culprit.


I went round and round in circles with this "same" error message. Same problem who knows :) I have version 1.19.1 of the interpreter installed and it has been working reasonably well for a week or so. I say reasonably because there were some strange hangs but I put that down to my multi threaded code doing strange things.

Then suddenly I could not connect at all and receive the "~Access is denied~" message above. I could reinstall 1.19.1 no problem after powering up with the boot sel button on but it did not solve the problem. I tried connecting using different PC's and after a while I gave up and went back to version 1.81 of the interpreter. I could connect via the com port first go. So it looks like the most recent version has some problems.

Just for fun I tried the unstable version. 20230209-unstable-v1.19.1-859-g41ed01f13 It also failed to connect via the com port.

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 12, 2023 at 18:07
  • why is it broken now? It used to work a couple of years ago!
    – Robin
    Commented Apr 30 at 8:26
  • arrrgggh could not connect to pico. tried different cable, worked striaght away. I hate no data charging only cables. wasted my time. Cut up with cutters and chucked in the bin.
    – Robin
    Commented Apr 30 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.