Densify icon indicating copy to clipboard operation
Densify copied to clipboard

No such file or directory: 'notify-send'

Open bmcage opened this issue 5 years ago • 3 comments

Apparently Densify requires notify-send.

GUI hangs on compress. In a terminal I see:

Traceback (most recent call last):
  File "/opt/Densify/densify", line 305, in on_button_clicked
    subprocess.run(["notify-send", "PDF Compressed!"])
  File "/usr/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'notify-send'

Should be solved by doing on a Ubuntu system

sudo apt install libnotify-bin

Ideally the install script installs it, or the code checks if present, instead of blocking the GUI

bmcage avatar Jan 29 '21 16:01 bmcage

Follow up error after libnotify-bin with a file output of test:

  1. I obtain notification that filename does not end on .pdf

  2. Nevertheless, the GUI hangs, as although this happened, calling gs happened anyway ?

     GPL Ghostscript 9.50: **** Could not open the file None/test .
     **** Unable to open the initial device, quitting.
     Traceback (most recent call last):
       File "/opt/Densify/densify", line 309, in on_button_clicked
         oFileSizeRaw = os.path.getsize(oFile)
       File "/usr/lib/python3.8/genericpath.py", line 50, in getsize
         return os.stat(filename).st_size
     FileNotFoundError: [Errno 2] No such file or directory: 'None/test'
    

bmcage avatar Jan 29 '21 16:01 bmcage

Nevertheless, the GUI hangs, as although this happened, calling gs happened anyway ?

this one is a duplicate of #9

jose1711 avatar Mar 05 '23 23:03 jose1711

@bmcage #9 is resolved in v0.3.2 which should solve your problem. I will open a separate issue for your suggestion of including the installation of libnotify-bin in the install script. Thanks!

Thanks again for chiming in again @jose1711!

hkdb avatar Jun 24 '24 10:06 hkdb