Computer doesnt read the arduino port

Hello, i am working with Arduino and python IDLE to control the servo motor. Everything seems to work in the beginning but then afterwards everything breaks. The arduino port com3 just dissapears. The arduino is connected to the computer but it is not being read. also here is the error code that i get in the python IDLE;

Traceback (most recent call last):
File "C:\Users\David\Desktop\AdruinoServoFiles\", line 29, in
ser = serial.Serial(usbport, 9600, timeout=1)
File "C:\Python26\Lib\site-packages\serial\", line 30, in init
SerialBase.init(self, *args, **kwargs)
File "C:\Python26\Lib\site-packages\serial\", line 260, in init
File "C:\Python26\Lib\site-packages\serial\", line 56, in open
raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError()))
SerialException: could not open port COM3: [Error 2] The system cannot find the file specified.

thank you very much.


This forum is about arduino.. your problem is about python. Please post in an appropriate forum :wink:

How does your code do using the serial monitor? Does it also "disappear"? If it works well with the serial monitor and fails with Python, then guix is right.

What do you mean by "Python IDLE"

Have a look at this Python-Arduino demo.


What do you mean by "Python IDLE"

Eric Idle?

Integrated DeveLopment Environment

Integrated DeveLopment Environment

Well whaddaya know.

I've been using Python for about 12 months and never noticed it. I assumed the OP had made a typo - humble apologies.