Calibre won't run

(Maerman) #1

Calibre doesn’t appear in my application menu, and running it in the terminal gives me the following results:

Traceback (most recent call last):
  File "/usr/bin/calibre", line 20, in <module>
    sys.exit(calibre())
  File "/usr/lib/calibre/calibre/gui_launch.py", line 74, in calibre
    main(args)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 558, in main
    gui_debug=gui_debug)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 387, in run_gui
    from calibre.gui2.ui import Main
  File "/usr/lib/calibre/calibre/gui2/ui.py", line 42, in <module>
    from calibre.gui2.init import LibraryViewMixin, LayoutMixin
  File "/usr/lib/calibre/calibre/gui2/init.py", line 19, in <module>
    from calibre.gui2.book_details import BookDetails
  File "/usr/lib/calibre/calibre/gui2/book_details.py", line 20, in <module>
    from calibre.ebooks.metadata.book.render import mi_to_html
  File "/usr/lib/calibre/calibre/ebooks/metadata/book/render.py", line 17, in <module>
    from calibre.library.comments import comments_to_html, markdown
  File "/usr/lib/calibre/calibre/library/comments.py", line 11, in <module>
    from calibre.ebooks.BeautifulSoup import (
  File "/usr/lib/calibre/calibre/ebooks/BeautifulSoup.py", line 7, in <module>
    import bs4

When I use sudo, I get a different but very similar result:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Traceback (most recent call last):
  File "/usr/bin/calibre", line 20, in <module>
    sys.exit(calibre())
  File "/usr/lib/calibre/calibre/gui_launch.py", line 74, in calibre
    main(args)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 558, in main
    gui_debug=gui_debug)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 387, in run_gui
    from calibre.gui2.ui import Main
  File "/usr/lib/calibre/calibre/gui2/ui.py", line 42, in <module>
    from calibre.gui2.init import LibraryViewMixin, LayoutMixin
  File "/usr/lib/calibre/calibre/gui2/init.py", line 19, in <module>
    from calibre.gui2.book_details import BookDetails
  File "/usr/lib/calibre/calibre/gui2/book_details.py", line 20, in <module>
    from calibre.ebooks.metadata.book.render import mi_to_html
  File "/usr/lib/calibre/calibre/ebooks/metadata/book/render.py", line 17, in <module>
    from calibre.library.comments import comments_to_html, markdown
  File "/usr/lib/calibre/calibre/library/comments.py", line 11, in <module>
    from calibre.ebooks.BeautifulSoup import (
  File "/usr/lib/calibre/calibre/ebooks/BeautifulSoup.py", line 7, in <module>
    import bs4
ImportError: No module named bs4

At first, I didn’t notice the difference between the two outputs (I apologize for my oversight there), but then @brikler suggested this forum post, which got me googling and led me to this post on a different forum, where the XDG_RUNTIME_DIR error is attributed to a general issue with Qt and sudo. So that, combined with the fact that I only get that specific output when I use sudo, gives me the idea that this is not a problem that originates in my environment variables. I’m thinking that I’m probably missing some piece of software, or something isn’t where Calibre expects it to be.

I’m using an Acer Nitro 5 laptop with a Core i7 8750 with 16 GB of RAM and a Geforce GTX 1060 Mobile. I don’t know what’s happening here, and I cant seem to find other instances of this specific problem here or through Google. Any help (or explanations about what I’m doing wrong) would be appreciated. And feel free to tell me I’m an idiot for missing something obvious; I probably am.

(tom) #2

maybe solves this your problem

(Maerman) #3

Unfortunately not, no. But thanks for your help, nonetheless. You did help me to realize that I made a mistake with my original post. I’ll update it now; maybe that will help to clarify matters.

(totte) #4

I suggest not using sudo as a general solution to issues that are unrelated to permissions.

Do you have python2-beautifulsoup4 installed? It’s listed as an optional dependency. Install it, and try again.

1 Like
(Maerman) #5

That did it! Thank you very much; I appreciate it. I thought it had something to do with whatever “bs4” was, and you confirmed it. I’ll keep a more vigilant eye out for that kind of thing in the future.

Probably good advice; I’ll keep it in mind. Thanks.