veltzer / openbook

OpenBook is an open source Jazz real book
https://veltzer.github.io/openbook/
GNU General Public License v3.0
275 stars 41 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'qpdf': 'qpdf #108

Closed MikeiLL closed 4 years ago

MikeiLL commented 4 years ago

This project is so exciting. I was actually just looking for a lilypond file of Summertime for a student 'cause I was (or thought I was) in a rush. Came across github.com/tj64/org-bandbook, which lead me here.

I'm on a Mac. Ran under python3 -v Python 3.7.7 with the built-in venv: python3 -m venv openbook, cd openbook, source bin/activate, make. Got the above error somewhere in rendering the rock book:

$ tree docs -L 2
docs
├── build
│   ├── pdf.js
│   ├── pdf.js.map
│   ├── pdf.worker.js
│   └── pdf.worker.js.map
├── drumming.ly
├── drumming.pdf
├── drumming.ps
├── favicon.ico
├── guitar_album.ly
├── guitar_album.pdf
├── guitar_album.ps
├── index.html
├── israeli.ly
├── israeli.pdf
├── israeli.ps
├── openbook.ly
├── openbook.pdf
├── openbook.ps
├── rockbook.ly
├── rockbook.pdf
├── rockbook.ps
└── web
    ├── cmaps
    ├── debugger.js
    ├── images
    ├── locale
    ├── viewer.css
    ├── viewer.html
    ├── viewer.js
    └── viewer.js.map

Rock book TOC:

Ain't No Sunshine / Bill Withers 3 
Baby One More Time / Max Martin 4 
Creep / Radiohead 5 
Days Like This / Van Morrison 6 
Forever Young / Alphaville 7 
I Am Beautiful / Linda Perry 8 
Lucky Man / Greg Lake 9 
Shape of My Heart / Sting, Dominic Miller, Sting 10 
Talkin' Bout A Revolution / Tracy Chapman 11

Here is the full traceback:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py", line 179, in <module>
    main()
  File "/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py", line 175, in main
    config_arg_parse_and_launch()
  File "/Users/mikekilmer/Music/Lilypond/openbook/lib/python3.7/site-packages/pytconf/config.py", line 485, in config_arg_parse_and_launch
    launch=launch, args=args, app_name=app_name,
  File "/Users/mikekilmer/Music/Lilypond/openbook/lib/python3.7/site-packages/pytconf/config.py", line 368, in config_arg_parse_and_launch
    function_to_run()
  File "/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py", line 153, in run
    system_check_output(['qpdf', '--linearize', ConfigAll.pdf, t.name])
  File "/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py", line 61, in system_check_output
    pr = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'qpdf': 'qpdf'
make: *** [docs/rockbook.pdf] Error 1

When I moved the docs directory and ran make again, it errored out sooner:

$ make
doing [docs/openbook.ly]
doing [docs/openbook.pdf]
/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py: stderr is
warning: compressing over-full page by 1.5 staff-spaces
warning: page 16 has been compressed

/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py: return code is [0]
/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py: error in executing ['lilypond', '--loglevel=WARNING', '--ps', '--pdf', '--output=docs', 'docs/openbook.ly']
make: *** [docs/openbook.pdf] Error 1

Using LilyPond 2.19.82. Going to try upgrading and see if that helps.

MikeiLL commented 4 years ago

Same error with Lilypond -v 2.20.0:

 $ make
doing [docs/openbook.ly]
doing [docs/openbook.pdf]
/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py: stderr is
warning: compressing over-full page by 1.5 staff-spaces
warning: page 16 has been compressed

/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py: return code is [0]
/Users/mikekilmer/Music/Lilypond/openbook/scripts/wrapper_lilypond.py: error in executing ['lilypond', '--loglevel=WARNING', '--ps', '--pdf', '--output=docs', 'docs/openbook.ly']
make: *** [docs/openbook.pdf] Error 1

Running lilypond --loglevel=WARNING --pdf --output=docs docs/openbook.ly works with following two warnings:

warning: compressing over-full page by 1.5 staff-spaces
warning: page 16 has been compressed
veltzer commented 4 years ago

I never test on Macs.

So you have two problems here:

What can you do?

This should fix all of the errors above.

Let me know how this works out.

veltzer commented 4 years ago

I added a TODO item to test every release builds on a mac. I don't know when I will get around to doing it though...:)

MikeiLL commented 4 years ago

I added a TODO item to test every release builds on a mac. I don't know when I will get around to doing it though...:)

Ha ha. I hear that. Thank you. I will contribute where I can.

veltzer commented 4 years ago

ok closing.