Menu

Poppler error on Ubuntu 19.04

Help
2019-06-26
2019-07-01
  • peterthevicar

    peterthevicar - 2019-06-26

    Hi there, I installed the deb on Ubuntu 19.04. It installed fine but gives this message over and over again:

    Traceback (most recent call last):
       File "/usr/local/lib/python3.7/dist-packages/pdfbooklet/pdfbooklet.py", line 2342, in OnDraw
        document = Poppler.Document.new_from_stream(input_stream, -1, None, None)
     gi.repository.GLib.GError: poppler-quark: Failed to load document (0)
    

    The preview panel remains blank but when I press the Go button the .bklt file is produced correctly. I get the same if I download the tar and install manually. Also the same with many different input pdf files.
    Any idea what I might be doing wrong?
    TIA, Peter

     

    Last edit: peterthevicar 2019-06-26
  • Averell

    Averell - 2019-06-27

    Thanks a lot for your message. You are doing nothing wrong, this is a bug of Poppler, I think. We will try to fix that as soon as possible.

     
    • peterthevicar

      peterthevicar - 2019-06-27

      Thank you for the quick reply, I'll wait to hear back. Anything I can do to help?

       
  • Averell

    Averell - 2019-06-27

    I have created a 3.1.1 version which should fix this question. If new_from_steam fails, it will try new_from_file which should work.

     
    • peterthevicar

      peterthevicar - 2019-06-27

      I'll test it now, thank you.

       
  • peterthevicar

    peterthevicar - 2019-06-27

    I installed the 3.1.1 deb file. It seems to use a very different system and installed into /home/travis which is not on my path so running pdfbooklet gave "command not found"
    I then tried running /home/travis/virtualenv/python3.4.8/bin/pdfbooklet and got

    /home/travis/virtualenv/python3.4.8/bin/python3: bad interpreter: No such file or directory

    So then I tried:

    sudo ln -s /usr/bin/python3 /home/travis/virtualenv/python3.4.8/bin

    and then when I run it I get:

    $ /home/travis/virtualenv/python3.4.8/bin/pdfbooklet
    Error: Could not import pdfbooklet
    Cause: No module named 'pdfbooklet'

    Not sure what to try next!

     

    Last edit: peterthevicar 2019-06-27
  • Averell

    Averell - 2019-06-27

    OK, I see. This is a consequence of the automatic build on Travis. I thought the programmer who makes the Linux versions (I am on Windows) had tested, but apparently not. I'll remove the files, fix it and ask you to test again. Thank you for your patience, it may take some days.
    But if you are familiar with Linux : you could reinstall the 3.1.0 version, and replace the pdfbooklet.py file by the version present in the 3.1.1 tarball. This is the only file I have modified.

     
  • peterthevicar

    peterthevicar - 2019-06-29

    You are a star! I re-installed 3.1.0 from the deb and ran it using:

    PYTHONPATH="/usr/local/lib/python3.5/dist-packages" pdfbooklet
    

    It doesn't work without the PYTHONPATH (gives 'no module named pdfbooklet' error) so the installed application shortcut doesn't work.

    This gave me the poppler-quark errors as expected.

    Copying pdfbooklet.py from the 3.1.1 deb into /usr/local/lib/python3.5/dist-packages/pdfbooklet fixed it and it works fine now.

    THANK YOU!

    FYI, other python packages seem to install into /usr/lib/python3/dist-packages so a workaround that gets the installed application shortcut working too is:

    sudo ln -s /usr/local/lib/python3.5/dist-packages/pdfbooklet* python3/dist-packages/
    

    I've attached a deb which installs into /usr/lib/python3 and 'just works' on ubuntu in case anyone else would like it.

     

    Last edit: peterthevicar 2019-06-29
  • Averell

    Averell - 2019-06-30

    Hello, thanks for your tests and the deb file. We are working on an installer which would work also for the next versions, and which would install in /usr/lib/python3. But I will put online your deb file, until we have a new one. Thanks.
    Would you be ready to be beta tester for next versions ?

     
    • peterthevicar

      peterthevicar - 2019-07-01

      Always happy to help a fellow Open Sourcer!

       

      Last edit: peterthevicar 2019-07-01

Log in to post a comment.