Skip to content

Interrogator should write bytes, not unicode strings. #139

@ashmastaflash

Description

@ashmastaflash
26.12.19 16:11:20 (-0500)  main    File "./runner.py", line 449, in <module>
26.12.19 16:11:20 (-0500)  main      main()
26.12.19 16:11:20 (-0500)  main    File "./runner.py", line 35, in main
26.12.19 16:11:20 (-0500)  main      config = sitchlib.ConfigHelper()
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/sitchlib/config_helper.py", line 23, in __init__
26.12.19 16:11:20 (-0500)  main      self.detector = dd()
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/sitchlib/device_detector.py", line 29, in __init__
26.12.19 16:11:20 (-0500)  main      self.gsm_radios = DeviceDetector.find_gsm_radios(self.usbtty_ports)
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/sitchlib/device_detector.py", line 43, in find_gsm_radios
26.12.19 16:11:20 (-0500)  main      if DeviceDetector.is_a_gsm_modem(devpath):
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/sitchlib/device_detector.py", line 90, in is_a_gsm_modem
26.12.19 16:11:20 (-0500)  main      test_command)
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/sitchlib/device_detector.py", line 110, in interrogator
26.12.19 16:11:20 (-0500)  main      serconn.write(test_command)
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/venv/lib/python3.6/site-packages/serial/serialposix.py", line 532, in write
26.12.19 16:11:20 (-0500)  main      d = to_bytes(data)
26.12.19 16:11:20 (-0500)  main    File "/app/sitch/venv/lib/python3.6/site-packages/serial/serialutil.py", line 63, in to_bytes
26.12.19 16:11:20 (-0500)  main      raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
26.12.19 16:11:20 (-0500)  main  TypeError: unicode strings are not supported, please encode to bytes: 'ATI \r\n'```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions