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

tm-reader-client: couple of instances of SerialException: could not open port 'COM4': OSError(22, 'The semaphore timeout period has expired.', None, 121) #26

Open
louking opened this issue Sep 6, 2023 · 3 comments
Labels
bug Something isn't working operational Operational problem / fix

Comments

@louking
Copy link
Owner

louking commented Sep 6, 2023

2023-09-06 06:46:35,822 tm-csv-connector INFO: time machine async reader started with port COM4
Exception in thread Thread-2 (reader_thread):
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\lking\Documents\Lou's Software\projects\tm-csv-connector\tm-csv-connector\tm-reader-client\app.py", line 205, in reader_thread
    run(reader(port, logging_path))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete 
    return future.result()
  File "C:\Users\lking\Documents\Lou's Software\projects\tm-csv-connector\tm-csv-connector\tm-reader-client\app.py", line 164, in reader
    transport, protocol = await create_serial_connection(readloop, InputChunkProtocol, port)
  File "C:\Users\lking\Documents\Lou's Software\projects\tm-csv-connector\tm-csv-connector\.venv\lib\site-packages\serial_asyncio\__init__.py", line 448, in create_serial_connection
    serial_instance = serial.serial_for_url(*args, **kwargs)
  File "C:\Users\lking\Documents\Lou's Software\projects\tm-csv-connector\tm-csv-connector\.venv\lib\site-packages\serial\__init__.py", line 90, in serial_for_url    
    instance.open()
  File "C:\Users\lking\Documents\Lou's Software\projects\tm-csv-connector\tm-csv-connector\.venv\lib\site-packages\serial\serialwin32.py", line 64, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM4': OSError(22, 'The semaphore timeout period has expired.', None, 121)
@louking louking added the bug Something isn't working label Sep 6, 2023
@louking louking added the operational Operational problem / fix label Sep 13, 2023
@louking
Copy link
Owner Author

louking commented Sep 13, 2023

This seems to occur if connect is issued before time machine is ready. Will reopen if seen to occur at other times.

@louking louking closed this as completed Sep 13, 2023
@louking
Copy link
Owner Author

louking commented Sep 14, 2023

This occurs sometimes even with time machine is ready.

@louking louking reopened this Sep 14, 2023
@louking
Copy link
Owner Author

louking commented Jan 5, 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 operational Operational problem / fix
Projects
Status: Backlog
Development

No branches or pull requests

1 participant