ScienceGeyser

Error Watlow

Jun 21st, 2021 (edited)
843
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ sudo watlow /dev/ttyUSB0
  2. Traceback (most recent call last):
  3.   File "/home/pi/Repositories/watlow/watlow/__init__.py", line 44, in command_line
  4.     state = temperature_controller.get()
  5.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 100, in get
  6.     check=self.responses[key]
  7.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 147, in _write_and_read
  8.     return self._write_and_read(request, length, check, retries-1)
  9.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 147, in _write_and_read
  10.     return self._write_and_read(request, length, check, retries-1)
  11.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 147, in _write_and_read
  12.     return self._write_and_read(request, length, check, retries-1)
  13.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 133, in _write_and_read
  14.     raise IOError("Could not communicate with Watlow.")
  15. OSError: Could not communicate with Watlow.
  16.  
  17. During handling of the above exception, another exception occurred:
  18.  
  19. Traceback (most recent call last):
  20.   File "/usr/local/bin/watlow", line 33, in <module>
  21.     sys.exit(load_entry_point('watlow', 'console_scripts', 'watlow')())
  22.   File "/home/pi/Repositories/watlow/watlow/__init__.py", line 47, in command_line
  23.     temperature_controller.close()
  24.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 90, in close
  25.     self.connection.flush()
  26.   File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 672, in flush
  27.     raise PortNotOpenError()
  28. serial.serialutil.PortNotOpenError: Attempting to use a port that is not open
  29.  
  30. New Error
  31.  
  32. Traceback (most recent call last):
  33.   File "/usr/local/bin/watlow", line 33, in <module>
  34.     sys.exit(load_entry_point('watlow', 'console_scripts', 'watlow')())
  35.   File "/home/pi/Repositories/watlow/watlow/__init__.py", line 40, in command_line
  36.     temperature_controller = TemperatureController(port=args.port)
  37.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 78, in __init__
  38.     self.open()
  39.   File "/home/pi/Repositories/watlow/watlow/driver.py", line 82, in open
  40.     self.connection = serial.Serial(
  41. AttributeError: module 'serial' has no attribute 'Serial'
  42.  
  43.  
  44. Python Script to run...
  45. from time import sleep
  46. import serial
  47. connection = serial.Serial('/dev/ttyUSB0', 38400)
  48. try:
  49.     connection.write('55FF0510000006E8010301040101E399'.decode('hex'))
  50.     sleep(1)
  51.     print(connection.read(connection.inWaiting()).encode('hex'))
  52. finally:
  53.     connection.close()
  54.  
RAW Paste Data