Output plugin doesn't work from command line

Bug #1481534 reported by Jan-Christian on 2015-08-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kobo Touch Extended Driver
Triaged
High
Joel Goguen

Bug Description

The output plugin does not initialize properly when the command line version of the conversion, ebook-convert is called. An example output is:

$ ebook-convert test.epub test.kepub
Failed to initialize plugin: '/home/jc/.config/calibre/plugins/KoboTouchExtended.zip'
Failed to initialize plugin: '/home/jc/.config/calibre/plugins/KePub Metadata Writer.zip'
Failed to initialize plugin: u'/home/jc/.config/calibre/plugins/KePub Output.zip'
Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 342, in main
    parser, plumber = create_option_parser(args, log)
  File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 301, in create_option_parser
    plumber = Plumber(input, output, log, reporter)
  File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 739, in __init__
    raise ValueError('No plugin to handle output format: '+output_fmt)
ValueError: No plugin to handle output format: kepub

This is using calibre 2.33 and KePub Output 2.3.3.

Joel Goguen (jgoguen) on 2015-08-05
Changed in calibre-kobo-driver:
importance: Undecided → Critical
status: New → Fix Committed
assignee: nobody → Joel Goguen (jgoguen)
Joel Goguen (jgoguen) wrote :

This will require some research, I need to see how to properly handle plugins that have both GUI and CLI components.

Changed in calibre-kobo-driver:
importance: Critical → High
status: Fix Committed → Triaged
Joel Goguen (jgoguen) wrote :

This will not be a simple rewrite, and with how little time I have to devote to it anyway it'll likely take a while for me to get to this.

Jan-Christian (jchtt) wrote :

That’s a shame. Were you able to figure out what the problem was?

Joel Goguen (jgoguen) wrote :

The problem is that the CLI doesn't make the GUI libraries available and the plugin, as it's written now, will always load the GUI libraries. What needs to happen is to split out the code into a class (or set of classes) that can be loaded without the GUI and then reference the GUI classes in a special way. http://manual.calibre-ebook.com/creating_plugins.html#a-user-interface-plugin gives an example.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers