#84 Win: [Error 5] Access denied with 2.5 RC2

v2.5
closed-works-for-me
Chris Liechti
None
5
2013-10-17
2010-04-07
Anonymous
No

Python2.6, Windows XP, pyserial-2.5_rc2-py2.6.egg gives "[Error 5] Access denied" an all ports with all settings on different computers sometimes at "open()" sometines at serial.Serial(port=0). After deinstalltion of the egg an installtion of http://sourceforge.net/projects/pyserial/files/pyserial/2.4/pyserial-2.4.win32.exe/download the problem is gone.

Discussion


  • Anonymous
    2010-05-12

    Is there any further news on this? I'd really like to be able to use a ctypes connection to the serial port rather than having to use the pywintypes-dependent version.

     
  • Chris Liechti
    Chris Liechti
    2010-05-21

    This is probably an issue with a definition in serial/win32.py where e.g. a struct definition uses the wrong type for a 64 bit system. Not solved yet.

     
  • I encounter the same problem with Python2.7.1, Windows Vista Starter, and pyserial-2.5. This is on a clean installation so pyserial 2.4 was not there.

     
  • Paolo Patruno
    Paolo Patruno
    2011-03-30

    windows XP
    python 2.7.0
    pyserial 2.5

    I have "[Error 5] Access denied" at "open()" with serial.Serial(port=0).

    if I use serial.serial_for_url(url=0) the error diasappears

     
  • Stefano Costa
    Stefano Costa
    2011-06-29

    It looks like this bug is still affecting pySerial 2.5 on 64-bit systems. Can you confirm it?

     
  • tejas
    tejas
    2011-07-19

    i am getting this error too my system is win 7 and amd athlon processor python 2.7

    ser.open()
    File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 56, in open
    raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError()))
    SerialException: could not open port COM1: [Error 5] Access is denied.

     
  • Chris Liechti
    Chris Liechti
    2011-12-29

    • status: open --> pending-works-for-me
     
  • Chris Liechti
    Chris Liechti
    2011-12-29

    Closing as i'm not sure if this still applies. Please test with pySerial 2.6 (or newer)
    - Win64 fixes where implemented after the last comment below was made.
    - I'm not seeing any problem on several Win32 systems.

     
  • Chris Liechti
    Chris Liechti
    2013-10-17

    • status: pending-works-for-me --> closed-works-for-me
    • assigned_to: Chris Liechti
    • Group: --> v2.5