Skip to content

Reading logger gives struct.error #36

@stretch4x4

Description

@stretch4x4

I am getting the following traceback when trying to read one of my dataloggers currently. I think I have seen similar previously but usually rerunning my script solves it. However, the same logger fails on both get_data() and get_devinfo() currently repeatedly.

Traceback (most recent call last):
  File ".\build_excel - Copy.py", line 23, in <module>
    for row in device.get_data():
  File "C:\Python27\lib\site-packages\elitech\__init__.py", line 120, in get_data
    devinfo = self.get_devinfo()
  File "C:\Python27\lib\site-packages\elitech\__init__.py", line 94, in get_devinfo
    res = self._talk(req, DevInfoResponse(self.encode))
  File "C:\Python27\lib\site-packages\elitech\__init__.py", line 68, in _talk
    response.read(self._ser)
  File "C:\Python27\lib\site-packages\elitech\msg.py", line 222, in read
    res)
struct.error: unpack requires a string argument of length 160

Not sure if a newer version of pyserial would help as it seems quite old?
If there is any other information I can provide to help debug this, let me now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions