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

calibre: will crash if markdown is configured in custom column #72724

Closed
bennyandresen opened this issue Nov 3, 2019 · 0 comments · Fixed by #72726
Closed

calibre: will crash if markdown is configured in custom column #72724

bennyandresen opened this issue Nov 3, 2019 · 0 comments · Fixed by #72726

Comments

@bennyandresen
Copy link
Contributor

Describe the bug
calibre offers the ability to create custom columns and one of the options is:
Interpret this column as: Plain text formatted using markdown

If this option is used, the current version of calibre will crash as it lacks python-markdown in its environment.

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/gui2/book_details.py", line 896, in show_data
    self.book_info.show_data(data)
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/gui2/book_details.py", line 638, in show_data
    html = render_html(mi, css(), self.vertical, self.parent())
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/gui2/book_details.py", line 110, in render_html
    use_roman_numbers=config['use_roman_numerals_for_series_number'], pref_name=pref_name)
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/gui2/book_details.py", line 192, in render_data
    rating_font=rating_font(), default_author_link=default_author_link())
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/ebooks/metadata/book/render.py", line 126, in mi_to_html
    val = markdown(val)
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/library/comments.py", line 138, in markdown
    from calibre.ebooks.markdown import Markdown
  File "/nix/store/wzyg72rsmxblk4wazrw6ryl3hng7p5kl-calibre-3.48.0/lib/calibre/calibre/startup.py", line 69, in load_module
    return import_module(fullname[len('calibre.ebooks.'):])
  File "/nix/store/bzf8x5kpv3x4qi09xq2grnvccakvy7gz-python-2.7.17/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named markdown
[1]    15851 abort (core dumped)  calibre

To Reproduce
Steps to reproduce the behavior:

  1. Have custom formatted column configured in calibre
  2. start calibre
  3. crash, see above Traceback

Expected behavior
No crash, including working markdown formatting in the custom column

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.81, NixOS, 20.03pre199897.471869c9185 (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.1`
 - channels(benny): `""`
 - channels(root): `"nixos-20.03pre199897.471869c9185"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:
@domenkozar @pSub @AndersonTorres

bennyandresen added a commit to bennyandresen/nixpkgs that referenced this issue Nov 3, 2019
worldofpeace pushed a commit that referenced this issue Nov 3, 2019
fixes #72724

(cherry picked from commit c4aff4c)
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this issue Jan 13, 2020
fixes NixOS#72724

(cherry picked from commit c4aff4c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant