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

Raise TypeError when status is None #51

Closed
Aculeasis opened this issue Sep 28, 2021 · 3 comments
Closed

Raise TypeError when status is None #51

Aculeasis opened this issue Sep 28, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Aculeasis
Copy link

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 641, in async_device_update
    raise exc
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/zoneminder/camera.py", line 57, in update
    self._is_recording = self._monitor.is_recording
  File "/usr/local/lib/python3.9/site-packages/zoneminder/monitor.py", line 169, in is_recording
    return int(status) == STATE_ALARM
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
nabbi added a commit to nabbi/zmha-py that referenced this issue Dec 21, 2023
I have not observed these faults behavior myself

PR rohankapoorcom#49 and rohankapoorcom#50 have different string checks for what they saw.
This attempts to cover both and the faults logged in bug rohankapoorcom#51

Signed-off-by: Nic Boet <nic@boet.cc>
@nabbi
Copy link
Collaborator

nabbi commented Dec 21, 2023

PR #49 and #50 have proposed changes related to this bug.
I added to the confusion by submitting #56 with yet another variation which should cover these unknown scenarios in which we are getting a non Integer value

@nabbi
Copy link
Collaborator

nabbi commented Dec 21, 2023

Also. #48 appears to be the same issue.

@nabbi nabbi added the bug Something isn't working label Dec 31, 2023
@nabbi
Copy link
Collaborator

nabbi commented Jan 6, 2024

fixed in v0.5.3

@nabbi nabbi closed this as completed Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants