Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: 2 is not a valid DeviceType #7

Open
wouterlemcke opened this issue May 23, 2020 · 2 comments
Open

ValueError: 2 is not a valid DeviceType #7

wouterlemcke opened this issue May 23, 2020 · 2 comments

Comments

@wouterlemcke
Copy link

The Seneye sensor crashes for me on getting the device type (sensor.py:166).

I solved it by hardcoding it to 'pond'

>>> device_type = data.device_type.name
ValueError: 2 is not a valid DeviceType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/pyseneye/sud.py", line 180, in device_type
    return DeviceType(self._device_type)
  File "/usr/lib/python3.7/enum.py", line 310, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.7/enum.py", line 564, in __new__
    raise exc
  File "/usr/lib/python3.7/enum.py", line 548, in __new__
    result = cls._missing_(value)
  File "/usr/lib/python3.7/enum.py", line 577, in _missing_
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 2 is not a valid DeviceType
@mcclown
Copy link
Owner

mcclown commented May 25, 2020

Thanks for the bug report. I'd never had a Seneye Pond to test with before. It looks like pyseneye has an issue with it. I'll open a corresponding bug there as well.

@wouterlemcke
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants