May-22-2017, 11:58 PM
(This post was last modified: May-23-2017, 12:04 AM by sparkz_alot.)
Thanks.
Tried after removing quotes but still get error:
ValueErrorTraceback (most recent call last)
C:\Users\Dell\Downloads\lat_lon1.py in <module>()
27 ser = serial.Serial()
28 ser.baudrate = 4800
---> 29 ser.port = COMNUM -1#starts at 0, so subtract 1
30
31 ser.timeout = 1 #you must specify a timeout (in seconds) so that the serial port doesn't hang
C:\Users\Dell\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\serial\serialutil.pyc in port(self, port)
262 """
263 if port is not None and not isinstance(port, basestring):
--> 264 raise ValueError('"port" must be None or a string, not {}'.format(type(port)))
265 was_open = self.is_open
266 if was_open:
ValueError: "port" must be None or a string, not <type 'int'>
Tried after removing quotes but still get error:
ValueErrorTraceback (most recent call last)
C:\Users\Dell\Downloads\lat_lon1.py in <module>()
27 ser = serial.Serial()
28 ser.baudrate = 4800
---> 29 ser.port = COMNUM -1#starts at 0, so subtract 1
30
31 ser.timeout = 1 #you must specify a timeout (in seconds) so that the serial port doesn't hang
C:\Users\Dell\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\serial\serialutil.pyc in port(self, port)
262 """
263 if port is not None and not isinstance(port, basestring):
--> 264 raise ValueError('"port" must be None or a string, not {}'.format(type(port)))
265 was_open = self.is_open
266 if was_open:
ValueError: "port" must be None or a string, not <type 'int'>