|
|
#1 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,171
Karma: 92500001
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Question about ConversionUserFeedBack
I am working on a calibre Conversion Output plugin and have come across something that I don't understand so I am asking about it here.
Unfortunately, the plugin is expected to fail to convert some books and I want to notify the user of the reason why when this occurs. To do this I am raising a ConversionUserFeedBack exception to provide the error message. I used this test code to always simulate a conversion error: Code:
def convert(self, oeb_book, output, input_plugin, opts, log):
import calibre.ebooks.conversion
raise calibre.ebooks.conversion.ConversionUserFeedBack("Conversion failed", "test", level="error")
Code:
Python function terminated unexpectedly
{"title": "Conversion failed", "msg": "test", "det_msg": "", "level": "error"} (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 190, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 1219, in run
File "calibre_plugins.kfx_output.__init__", line 49, in convert
calibre.ebooks.conversion.ConversionUserFeedBack: {"title": "Conversion failed", "msg": "test", "det_msg": "", "level": "error"}
Code:
[Python function terminated unexpectedly
{"title": "Conversion failed", "det_msg": "", "level": "error", "msg": "test"} (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 190, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 31, in gui_convert_override
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 1219, in run
File "calibre_plugins.kfx_output.__init__", line 49, in convert
ConversionUserFeedBack: {"title": "Conversion failed", "det_msg": "", "level": "error", "msg": "test"}
I cannot figure out why the exception is sometimes reported differently in the log. Any help would be appreciated. |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,664
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,171
Karma: 92500001
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
That fixed it. Thanks!
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question about PW 3g | mystika1 | Amazon Kindle | 6 | 07-11-2014 07:36 PM |
| Question about 0.7.9 - what does this mean? | texasnightowl | Calibre | 8 | 07-19-2010 10:04 PM |
| Classic Few Nook Question and Question on Nook 3G vs WiFi | blackonblack | Barnes & Noble NOOK | 4 | 07-02-2010 03:07 AM |
| Looking for another reader question and PRS-600 question | lilpretender | Which one should I buy? | 9 | 10-24-2009 05:02 AM |
| Hello to everyone and then a question | BuAba | Which one should I buy? | 8 | 03-26-2008 05:28 AM |