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

Log/Handle serial.serialutil.SerialException(s) #10

Open
joedougherty opened this issue Aug 9, 2018 · 0 comments
Open

Log/Handle serial.serialutil.SerialException(s) #10

joedougherty opened this issue Aug 9, 2018 · 0 comments

Comments

@joedougherty
Copy link
Owner

My distractd process died recently, but this output was only available via console.

This should at least be logged. It really ought to throw some kind of non-silent error (perhaps as a notification itself)?

1.) Figure out how to reproduce error.
2.) Log.
3.) Find appropriate notification mechanism to let user know the process died.

Example traceback:

Traceback (most recent call last):
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/serial/serialposix.py", line 501, in read
    'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/distractinator/Distractinator.py", line 220, in run
    serialMsg = port.readline().strip()
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/serial/serialposix.py", line 509, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/serial/serialposix.py", line 501, in read
    'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/josepd/VENV/d2/bin/distractd", line 11, in <module>
    sys.exit(main())
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/distractinator/__init__.py", line 5, in main
    d.run()
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/distractinator/Distractinator.py", line 228, in run
    serialMsg = port.readline().strip()
  File "/home/josepd/VENV/d2/lib/python3.6/site-packages/serial/serialposix.py", line 509, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

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

1 participant