You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for making this project. I'm trying to write a little chat app over AX.25 and was trying to catch to errors.
The first I figured out, if direwolf isn't running the device never transitons to OPEN, so I can catch that:
while self.device.state != KISSDeviceState.OPEN:
msg = f"Waiting for direwolf connection... attempt {i}/{max_attempts}"
print(msg, end="\r") # noqa: T201
if i > max_attempts:
msg = "Cannot connect to direwolf. Is it running?"
LOGGER.critical(msg)
sys.exit(1)
await asyncio.sleep(1)
i += 1
The second, which I cannot figure out, is if direwolf disappears after the device was open.
In this case if direwolf is no longer running I get the following:
Unhandled exception in event loop:
File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run
self._context.run(self._callback, *self._args)
File "/home/bthornto/github/ax25/venv/lib64/python3.12/site-packages/aioax25/kiss.py", line 321, in _send_data
self._send_raw_data(data)
File "/home/bthornto/github/ax25/venv/lib64/python3.12/site-packages/aioax25/kiss.py", line 448, in _send_raw_data
self._transport.write(data)
^^^^^^^^^^^^^^^^^^^^^
Exception 'NoneType' object has no attribute 'write'
Any suggestions or pointers on how to catch this one? I would like to gracefully exit the app when it happens.
Thanks for any info/suggestions,
Brad
The text was updated successfully, but these errors were encountered:
Hey there,
Thanks for making this project. I'm trying to write a little chat app over AX.25 and was trying to catch to errors.
The first I figured out, if direwolf isn't running the device never transitons to OPEN, so I can catch that:
The second, which I cannot figure out, is if direwolf disappears after the device was open.
In this case if direwolf is no longer running I get the following:
Any suggestions or pointers on how to catch this one? I would like to gracefully exit the app when it happens.
Thanks for any info/suggestions,
Brad
The text was updated successfully, but these errors were encountered: