Beginner Pyserial Question

JAMoore84 at gmail.com JAMoore84 at gmail.com
Thu Jan 24 11:44:31 EST 2008


Hi Guys,

I have a project where I'd like to save GPS data that is streamed to a
Sony Vaio over bluetooth.  I can monitor the data stream over Hyper
Terminal, but I'd like to use python to capture it as well.  I've
installed Python 2.5, pyserial 2.2 and the appropriate pywin program
(pywin32-210.win32-py2.5.exe).

My problem comes when I try to open a serial port.  After importing
"serial", I issue the following statement:

>>> GPS = serial.Serial(0)

Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    GPS = serial.Serial(0)
  File "C:\Python25\lib\site-packages\serial\serialutil.py", line 156,
in __init__
    self.open()
  File "C:\Python25\lib\site-packages\serial\serialwin32.py", line 55,
in open
    raise SerialException("could not open port: %s" % msg)
SerialException: could not open port: (2, 'CreateFile', 'The system
cannot find the file specified.')

I'm not sure where the source of the problem is.  I was wondering if
someone could recognize what might be be.  the Vaio is running XP
SP2.  Thanks!



More information about the Python-list mailing list