View Single Post
Old 02-07-2025, 04:09 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,350
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may be worth, I tried converting a text version of The Owl and the Pussy Cat poem to ePub using calibre 7.25. Regular expression error?

The conversion failed and the log file is in the spoiler.

Spoiler:
Code:
calibre, version 7.25.0 (win32, embedded-python: True)
Conversion error: Failed: Convert book 1 of 1 (The Owl and the Pussy-Cat)

Convert book 1 of 1 (The Owl and the Pussy-Cat)
Conversion options changed from defaults:
  output_profile: 'tablet'
  verbose: 2
  margin_right: 0.0
  margin_left: 0.0
  change_justification: 'left'
  margin_bottom: 0.0
  extra_css: 'body {\n-epub-hyphens: none;\nadobe-hyphenate: none;\n-webkit-hyphens: none;\n-moz-hyphens: none;\nhyphens: none;\n}'
  preserve_cover_aspect_ratio: True
  read_metadata_from_opf: 'C:\\Users\\dbowe\\AppData\\Local\\Temp\\calibre_64vjz1m8\\vjbflenm.opf'
  enable_heuristics: True
  margin_top: 0.0
Resolved conversion options
calibre version: 7.25.0
{'add_alt_text_to_img': False,
 'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 0.0,
 'book_producer': None,
 'change_justification': 'left',
 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
            "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', "
            "'i')) or @class = 'chapter']",
 'chapter_mark': 'pagebreak',
 'comments': None,
 'cover': None,
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'dont_split_on_page_breaks': False,
 'duplicate_links_in_toc': False,
 'embed_all_fonts': False,
 'embed_font_family': None,
 'enable_heuristics': True,
 'epub_flatten': False,
 'epub_inline_toc': False,
 'epub_max_image_size': 'none',
 'epub_toc_at_end': False,
 'epub_version': '2',
 'expand_css': False,
 'extra_css': 'body {\n'
              '-epub-hyphens: none;\n'
              'adobe-hyphenate: none;\n'
              '-webkit-hyphens: none;\n'
              '-moz-hyphens: none;\n'
              'hyphens: none;\n'
              '}',
 'extract_to': None,
 'filter_css': '',
 'fix_indents': True,
 'flow_size': 260,
 'font_size_mapping': None,
 'format_scene_breaks': True,
 'formatting_type': 'auto',
 'html_unwrap_factor': 0.4,
 'input_encoding': None,
 'input_profile': <calibre.customize.profiles.InputProfile object at 0x0000022712B5BE90>,
 'insert_blank_line': False,
 'insert_blank_line_size': 0.5,
 'insert_metadata': False,
 'isbn': None,
 'italicize_common_cases': True,
 'keep_ligatures': False,
 'language': None,
 'level1_toc': None,
 'level2_toc': None,
 'level3_toc': None,
 'line_height': 0.0,
 'linearize_tables': False,
 'margin_bottom': 0.0,
 'margin_left': 0.0,
 'margin_right': 0.0,
 'margin_top': 0.0,
 'markdown_extensions': 'footnotes, tables, toc',
 'markup_chapter_headings': True,
 'max_toc_links': 50,
 'minimum_line_height': 120.0,
 'no_chapters_in_toc': False,
 'no_default_epub_cover': False,
 'no_inline_navbars': False,
 'no_svg_cover': False,
 'output_profile': <calibre.customize.profiles.TabletOutput object at 0x0000022712B82E10>,
 'page_breaks_before': "//*[name()='h1' or name()='h2']",
 'paragraph_type': 'auto',
 'prefer_metadata_cover': False,
 'preserve_cover_aspect_ratio': True,
 'preserve_spaces': False,
 'pretty_print': True,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': 'C:\\Users\\dbowe\\AppData\\Local\\Temp\\calibre_64vjz1m8\\vjbflenm.opf',
 'remove_fake_margins': True,
 'remove_first_image': False,
 'remove_paragraph_spacing': False,
 'remove_paragraph_spacing_indent_size': 1.5,
 'renumber_headings': True,
 'replace_scene_breaks': '',
 'search_replace': '[]',
 'series': None,
 'series_index': None,
 'smarten_punctuation': False,
 'sr1_replace': None,
 'sr1_search': None,
 'sr2_replace': None,
 'sr2_search': None,
 'sr3_replace': None,
 'sr3_search': None,
 'start_reading_at': None,
 'subset_embedded_fonts': False,
 'tags': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 'toc_title': None,
 'transform_css_rules': '[]',
 'transform_html_rules': '[]',
 'txt_in_remove_indents': False,
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
InputFormatPlugin: TXT Input running
on C:\Users\dbowe\AppData\Local\Temp\calibre_64vjz1m8\ia710iic.txt
Reading text from file...
Detected input encoding as ascii with a confidence of 100%
Auto detected paragraph type as print
Auto detected formatting as heuristic
Running text through basic conversion...
Language not specified
Creator not specified
Building file list...
	Found files...
		 HTMLFile:0:a:'C:\\Users\\dbowe\\AppData\\Local\\Temp\\calibre_64vjz1m8\\1s9i1_l1_plumber\\index.html'
Normalizing filename cases
Rewriting HTML links
Parsing index.html ...
*********  Heuristic processing HTML  *********
There are 0 blank lines. 0.0 percent blank
minimum chapters required are: 1
found 0 pre-existing headings
Total wordcount is: 242, Average words per section is: 242, Marked up 0 chapters
Hard line breaks check returned True
Median line length is 45, calculated with html format
Fixing hyphenated content
Looking for more split points based on punctuation, currently have 0
Formatting scene breaks
Traceback (most recent call last):
  File "runpy.py", line 198, in _run_module_as_main
  File "runpy.py", line 88, in _run_code
  File "site.py", line 83, in <module>
  File "site.py", line 78, in main
  File "site.py", line 50, in run_entry_point
  File "calibre\utils\ipc\worker.py", line 215, in main
  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "calibre\ebooks\conversion\plumber.py", line 1128, in run
  File "calibre\customize\conversion.py", line 242, in __call__
  File "calibre\ebooks\conversion\plugins\txt_input.py", line 325, in convert
  File "calibre\ebooks\conversion\plugins\html_input.py", line 109, in convert
  File "calibre\ebooks\conversion\plugins\html_input.py", line 209, in create_oebbook
  File "calibre\ebooks\oeb\base.py", line 1056, in data
  File "calibre\ebooks\oeb\base.py", line 966, in _parse_xhtml
  File "calibre\ebooks\oeb\parse_utils.py", line 203, in parse_html
  File "calibre\ebooks\conversion\preprocess.py", line 614, in __call__
  File "calibre\ebooks\conversion\utils.py", line 879, in __call__
  File "re\__init__.py", line 317, in _subx
  File "re\__init__.py", line 308, in _compile_repl
  File "re\_parser.py", line 1080, in parse_template
re.error: bad escape \u at position 14
DNSB is online now   Reply With Quote