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

--replaces-process throws exception in multiprocessing #24

Open
GregPK opened this issue Dec 12, 2023 · 6 comments
Open

--replaces-process throws exception in multiprocessing #24

GregPK opened this issue Dec 12, 2023 · 6 comments

Comments

@GregPK
Copy link

GregPK commented Dec 12, 2023

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'
@TimP4w
Copy link

TimP4w commented Dec 29, 2023

I have the same issue (Python 3.11.6)

                   -`                    timp4w@arch 
                  .o+`                   ----------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Kernel: 6.6.8-arch1-1 
               `+oooooo:                 Uptime: 3 hours, 22 mins 
               -+oooooo+:                Packages: 1018 (pacman), 12 (flatpak) 
             `/:-:++oooo+:               Shell: zsh 5.9 
            `/++++/+++++++:              Resolution: 2560x1440 
           `/++++++++++++++:             DE: Hyprland 
          `/+++ooooooooooooo/`           WM: sway 
         ./ooosssso++osssssso+`          Terminal: kitty 
        .oossssso-````/ossssss+`         CPU: Intel i7-9700K (8) @ 4.900GHz 
       -osssssso.      :ssssssso.        GPU: NVIDIA GeForce RTX 2070 Rev. A 
      :osssssss/        osssso+++.       Memory: 3620MiB / 32015MiB 
     /ossssssss/        +ssssooo/-
   `/ossssso+/:-        -:/+osssso+-                             
  `+sso+:-`                 `.-/+oso:                            
 `++:.                           `-/+/
 .`                                 `/


@tetsugakusha256
Copy link

Same issue here on arch too.
Python 3.11.6
Installed notify-send.py through AUR where notify-send-py has Version: 1.2.7-1

@phuhl
Copy link
Owner

phuhl commented Feb 8, 2024

Unfortunately I don't have time to work on a fix, currently. But PR is always welcome

@Qu4tro
Copy link

Qu4tro commented Mar 30, 2024

This is fixed on main actually. It just needs a new release.

@vincentaxhe
Copy link

vincentaxhe commented May 15, 2024

notify-send is capable of replace id now, as long as in a loop.
use -p to emit id, -r to replace id. I give up using notify-send.py with my deadd-notification, only volume notification is not ideal。

@ArchWand
Copy link

ArchWand commented Jun 3, 2024

notify-send is capable of replace id now, as long as in a loop. use -p to emit id, -r to replace id. I give up using notify-send.py with my deadd-notification, only volume notification is not ideal。

Thank you so much, I was pulling my hair out over this

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

7 participants