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

Exception in _event_worker_thread #19

Closed
party-pansen opened this issue Sep 25, 2019 · 3 comments
Closed

Exception in _event_worker_thread #19

party-pansen opened this issue Sep 25, 2019 · 3 comments

Comments

@party-pansen
Copy link

Hi,
I am using the Fhem EventQueue to catch all events in python. Sometimes (after hours and thousands of successfully tracked events) I get the following exception and my program stops:

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/fhem/__init__.py", line 765, in _event_worker_thread dt = datetime.datetime(int(dd[0]), int(dd[1]), ValueError: invalid literal for int() with base 10: 'Das'

I think it should be easy to fix by some try/except… ?

I am wondering that I am the first who is experiencing this problem…

Best regards
party-pansen

@domschl
Copy link
Owner

domschl commented Sep 26, 2019

Haven't seen this one before, but you're right, an exception handler should do the job.
I am preparing a fix for this.

long/medium term it would be probably better to have an alternative for socket connections for the event-queue.

@domschl domschl mentioned this issue Sep 26, 2019
@domschl
Copy link
Owner

domschl commented Sep 26, 2019

python-fhem 0.6.3 is now published and should fix that datetime parsing exception. Thanks for the clear bug-report.

@party-pansen
Copy link
Author

Thank you very much for this very fast fix!

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