Python Forum
Pyserial Issues with Python3.7 and Fluke Multimeter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pyserial Issues with Python3.7 and Fluke Multimeter
#2
Thank you Larz60+, i will be sure to correctly post in the future. Here is the error i am seeing.
Error:
Traceback (most recent call last): File "C:\Users\JeffF\Desktop\Python 3.7\Fluke 8846A Mesurement.py", line 18, in <module> ser.write('SENS:VOLT:RANG 10 \r\n') File "C:\Users\JeffF\AppData\Local\Programs\Python\Python37\lib\site-packages\serial\serialwin32.py", line 308, in write data = to_bytes(data) File "C:\Users\JeffF\AppData\Local\Programs\Python\Python37\lib\site-packages\serial\serialutil.py", line 63, in to_bytes raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq)) TypeError: unicode strings are not supported, please encode to bytes: 'SENS:VOLT:RANG 10 \r\n'
Looking up this error it seems that i should be using the following:
ser.write('SENS:VOLT:RANG 10 \r\n'.encoder())
but using this function causes an endless loop after the time sleep command
Reply


Messages In This Thread
RE: Pyserial Issues with Python3.7 and Fluke Multimeter - by jfisher930 - Jul-06-2018, 08:07 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020