View Single Post
Old 10-31-2019, 01:04 PM   #5
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,009
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Spoiler output:

Spoiler:
Code:
InputFormatPlugin: EPUB Input running
on C:\Users\user\Desktop\nook\calibre\Mutant Deviations - Temporal Knight.epub
         113703 function calls (107793 primitive calls) in 0.306 seconds

   Ordered by: cumulative time
   List reduced from 735 to 37 due to restriction <0.05>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.306    0.306 C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py:857(render)
        1    0.000    0.000    0.211    0.211 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\iterator\book.py:50(extract_book)
        1    0.000    0.000    0.209    0.209 C:\Users\user\Desktop\nook\calibre\src\calibre\customize\conversion.py:231(__call__)
        1    0.008    0.008    0.208    0.208 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\conversion\plugins\epub_input.py:256(convert)
        1    0.000    0.000    0.167    0.167 C:\Users\user\Desktop\nook\calibre\src\calibre\utils\zipfile.py:1088(extractall)
       26    0.000    0.000    0.167    0.006 C:\Users\user\Desktop\nook\calibre\src\calibre\utils\zipfile.py:1074(extract)
       26    0.139    0.005    0.167    0.006 C:\Users\user\Desktop\nook\calibre\src\calibre\utils\zipfile.py:1104(_extract_member)
        1    0.000    0.000    0.061    0.061 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\meta.py:73(get_metadata)
        1    0.000    0.000    0.061    0.061 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\meta.py:86(_get_metadata)
        1    0.000    0.000    0.056    0.056 C:\Users\user\Desktop\nook\calibre\src\calibre\customize\ui.py:416(get_file_type_metadata)
        1    0.002    0.002    0.056    0.056 C:\Users\user\Desktop\nook\calibre\src\calibre\customize\builtins.py:191(get_metadata)
        1    0.000    0.000    0.051    0.051 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\epub.py:239(get_quick_metadata)
        1    0.000    0.000    0.051    0.051 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\epub.py:216(get_metadata)
        1    0.000    0.000    0.050    0.050 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\opf.py:40(get_metadata)
        5    0.000    0.000    0.040    0.008 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\chardet.py:169(xml_to_unicode)
      484    0.010    0.000    0.038    0.000 {method 'sub' of '_sre.SRE_Pattern' objects}
        1    0.000    0.000    0.033    0.033 C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py:567(process_exploded_book)
        4    0.000    0.000    0.033    0.008 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\chardet.py:100(substitute_entites)
        2    0.001    0.000    0.032    0.016 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\utils.py:39(parse_opf)
        2    0.003    0.002    0.030    0.015 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\opf2.py:583(__init__)
        1    0.000    0.000    0.029    0.029 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\opf.py:34(get_metadata_from_parsed)
        1    0.000    0.000    0.029    0.029 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\opf.py:25(get_metadata2)
     3987    0.025    0.000    0.028    0.000 C:\Users\user\Desktop\nook\calibre\src\calibre\__init__.py:524(entity_to_unicode)
        2    0.000    0.000    0.025    0.012 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\book\base.py:471(smart_update)
        5    0.000    0.000    0.023    0.005 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\__init__.py:346(MetaInformation)
        7    0.001    0.000    0.022    0.003 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\book\base.py:81(__init__)
        1    0.000    0.000    0.022    0.022 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\opf2.py:643(to_book_metadata)
       54    0.000    0.000    0.019    0.000 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\metadata\book\base.py:476(copy_not_none)
        1    0.000    0.000    0.017    0.017 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:256(__init__)
  786/677    0.000    0.000    0.015    0.000 {getattr}
        1    0.000    0.000    0.013    0.013 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:295(refresh_mime_map)
       20    0.000    0.000    0.011    0.001 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:610(parsed)
        3    0.000    0.000    0.011    0.004 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:586(parse)
       15    0.001    0.000    0.011    0.001 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:540(opf_xpath)
       26    0.000    0.000    0.010    0.000 shutil.py:60(copyfileobj)
        2    0.001    0.000    0.010    0.005 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:200(parse_xml)
       15    0.000    0.000    0.010    0.001 C:\Users\user\Desktop\nook\calibre\src\calibre\ebooks\oeb\polish\container.py:634(opf)


P^@y^@t^@h^@o^@n^@ ^@f^@u^@n^@c^@t^@i^@o^@n^@ ^@t^@e^@r^@m^@i^@n^@a^@t^@e^@d^@ ^@u^@n^@e^@x^@p^@e^@c^@t^@e^@d^@l^@y^@
^@
^@ ^@ ^@'^@N^@o^@n^@e^@T^@y^@p^@e^@'^@ ^@o^@b^@j^@e^@c^@t^@ ^@h^@a^@s^@ ^@n^@o^@ ^@a^@t^@t^@r^@i^@b^@u^@t^@e^@ ^@'^@s^@e^@r^@i^@a^@l^@i^@z^@e^@'^@ ^@(^@E^@r^@r^@o^@r^@ ^@C^@o^@d^@e^@:^@ ^@1^@)^@
^@
^@Traceback (most recent call last):
  File "site.py", line 114, in main
  File "site.py", line 88, in run_entry_point
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\debug.py", line 348, in main
    run_script(args[1], args[2:])
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\debug.py", line 260, in run_script
    exec_path(ef, g)
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 932, in <module>
    profile()
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 927, in profile
    extract_annotations=True, virtualize_resources=False, max_workers=1
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 869, in render
    book_metadata=mi, virtualize_resources=virtualize_resources
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 637, in process_exploded_book
    ), container
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 476, in __call__
    return [process_book_files(names, *args, container=in_process_container)]
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 559, in process_book_files
    transform_html(container, name, virtualize_resources, link_uid, link_to_map, virtualized_names)
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 416, in transform_html
    shtml = html_as_json(root)
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\srv\render_book.py", line 763, in html_as_json
    serialize = plugins['html_as_json'][0].serialize
AttributeError: 'NoneType' object has no attribute 'serialize'


I've replaced the character '^@' (AKA \0, or NULL) in the output with the string "^@" so it's visible. That's the source of the single P, I bet.

For legibility, the string without NULLs is: "Python function terminated unexpectedly 'NoneType' object has no attribute 'serialize' (Error Code: 1)"
JimmXinu is offline   Reply With Quote