notify-send.py
notify-send.py copied to clipboard
--replaces-process throws exception in multiprocessing
Script runs fine in all other cases, but running with --replaces-process
on my machine like so:
notify-send.py --replaces-process testrep "Test replaces"
causes:
Traceback (most recent call last):
File "/home/gregpk/.local/pipx/venvs/notify-send-py/lib/python3.11/site-packages/notify_send_py/notify_send_py.py", line 126, in notify
conn = Client(pidf.read())
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 513, in Client
family = family or address_type(address)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 109, in address_type
raise ValueError('address type of %r unrecognized' % address)
ValueError: address type of b'' unrecognized
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gregpk/.local/bin/notify-send.py", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/gregpk/.local/pipx/venvs/notify-send-py/lib/python3.11/site-packages/notify_send_py/notify_send_py.py", line 218, in main
NotifySendPyCLI()
File "/home/gregpk/.local/pipx/venvs/notify-send-py/lib/python3.11/site-packages/notify_send_py/notify_send_py.py", line 199, in __init__
n_id = NotifySendPy().notify(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/gregpk/.local/pipx/venvs/notify-send-py/lib/python3.11/site-packages/notify_send_py/notify_send_py.py", line 132, in notify
pidf.write(listener.address)
TypeError: a bytes-like object is required, not 'str'