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

no attribute 'pipe_abort_read_r' on --replay #23

Closed
zed opened this issue Jul 17, 2024 · 3 comments
Closed

no attribute 'pipe_abort_read_r' on --replay #23

zed opened this issue Jul 17, 2024 · 3 comments

Comments

@zed
Copy link

zed commented Jul 17, 2024

Traceback (most recent call last):
  ...
  File "/home/me/.venv/lib/python3.11/site-packages/custom_device/__init__.py", line 101, in _loop
    sync = self.ser.read(size=1)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/me/.venv/lib/python3.11/site-packages/serial/serialposix.py", line 565, in rea...
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
                                          ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Serial' object has no attribute 'pipe_abort_read_r'
pyserial==3.5
pytest-reserial==0.4.1
@bessman
Copy link
Owner

bessman commented Jul 18, 2024

Thank you for the bug report!

The original Serial.read method has somehow leaked into the replay environment. I need more details to understand how it happened.

Can you share the test code, and the precise steps you take to run pytest?

@zed
Copy link
Author

zed commented Jul 23, 2024

The code is rather involved (multiple threads, serial is called via 3rd party library). I've managed to make it work with PR #24.

@zed zed closed this as completed Jul 23, 2024
@bessman
Copy link
Owner

bessman commented Jul 23, 2024

Thank you!

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