Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-03-2020, 11:17 AM   #1
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
Clear metadata more completely

I'd like to clear the metadata from many ebooks (.EPUB) except for certain fields, namely title, author, and possibly the identifier and source that corresponds to the Project Gutenberg book number. I am currently using Edit metadata in bulk to do this, i.e.

Spoiler:
Rating : Not rated : Apply rating
Publisher : (Blank) : Clear pub
Remove tags : (Blank) : Remove all
Series : (Blank) : Clear series
Date : Undefined : Apply date (Clicked remove button)
Published : Undefined : Apply date (Clicked remove button)
Languages : (Blank) : Remove all
Change cover : Remove cover
Set the comments for all selected books : (Blank)


However, when I use Edit book, I still find unwanted bits in the content.opf file between the <metadata> tags, including <dc:rights> and <dc:date opf:event="conversion">. Moreover, when I convert from .EPUB to .AZW3, I lose the <dc:identifier opf:scheme="URI" id="id"> and <dc:source> tags, which may not be desirable should I decide to keep/modify these. Here is an example of metadata from A Tale of Two Cities by Charles Dickens found at https://www.gutenberg.org/ebooks/98.epub.images :

Original
Spoiler:
Code:
<metadata>
    <dc:title>A Tale of Two Cities</dc:title>
    <dc:creator opf:role="aut" opf:file-as="Dickens, Charles">Charles Dickens</dc:creator>
    <dc:rights>Public domain in the USA.</dc:rights>
    <dc:identifier opf:scheme="URI" id="id">http://www.gutenberg.org/98</dc:identifier>
    <dc:date>1994-01-01T05:00:00+00:00</dc:date>
    <dc:date opf:event="conversion">2020-03-01T08:37:22.360047+00:00</dc:date>
    <dc:source>https://www.gutenberg.org/files/98/98-h/98-h.htm</dc:source>
    <dc:subject>Historical fiction</dc:subject>
    <dc:subject>France -- History -- Revolution</dc:subject>
    <dc:subject>1789-1799 -- Fiction</dc:subject>
    <dc:subject>London (England) -- History -- 18th century -- Fiction</dc:subject>
    <dc:subject>War stories</dc:subject>
    <dc:subject>Executions and executioners -- Fiction</dc:subject>
    <dc:subject>French -- England -- London -- Fiction</dc:subject>
    <dc:subject>Lookalikes -- Fiction</dc:subject>
    <dc:subject>British -- France -- Paris -- Fiction</dc:subject>
    <dc:subject>Paris (France) -- History -- 1789-1799 -- Fiction</dc:subject>
    <dc:language>en</dc:language>
    <dc:identifier opf:scheme="calibre">7c7b2a30-5b0b-41e9-a1fa-b1109aa06373</dc:identifier>
    <meta name="cover" content="item33"/>
    <meta name="calibre:title_sort" content="Tale of Two Cities, A"/>
    <meta name="calibre:author_link_map" content="{&quot;Charles Dickens&quot;: &quot;&quot;}"/>
  </metadata>


After Edit metadata in bulk
Spoiler:
Code:
<metadata>
    <dc:title>A Tale of Two Cities</dc:title>
    <dc:creator opf:role="aut" opf:file-as="Dickens, Charles">Charles Dickens</dc:creator>
    <dc:rights>Public domain in the USA.</dc:rights>
    <dc:identifier opf:scheme="URI" id="id">http://www.gutenberg.org/98</dc:identifier>
    <dc:date>0101-01-01T00:00:00+00:00</dc:date>
    <dc:date opf:event="conversion">2020-03-01T08:37:22.360047+00:00</dc:date>
    <dc:source>https://www.gutenberg.org/files/98/98-h/98-h.htm</dc:source>
    <dc:identifier opf:scheme="calibre">7c7b2a30-5b0b-41e9-a1fa-b1109aa06373</dc:identifier>
    <meta name="cover" content="item33"/>
    <meta name="calibre:title_sort" content="Tale of Two Cities, A"/>
    <meta name="calibre:author_link_map" content="{&quot;Charles Dickens&quot;: &quot;&quot;}"/>
  </metadata>


Subsequently using Polish books and Convert books (from .EPUB to .AZW3)
Spoiler:
Code:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:title>A Tale of Two Cities</dc:title>
    <dc:creator opf:role="aut" opf:file-as="Unknown">Charles Dickens</dc:creator>
    <dc:contributor opf:role="bkp" opf:file-as="calibre">calibre (4.10.1) [https://calibre-ebook.com]</dc:contributor>
    <dc:identifier id="calibre_id" opf:scheme="calibre">7c7b2a30-5b0b-41e9-a1fa-b1109aa06373</dc:identifier>
    <dc:date>0100-12-31T19:00:00-05:00</dc:date>
    <dc:language>eng</dc:language>
    <dc:identifier opf:scheme="MOBI-ASIN">7c7b2a30-5b0b-41e9-a1fa-b1109aa06373</dc:identifier>
    <dc:rights>Public domain in the USA.</dc:rights>
  </metadata>


Is there a more thorough way of clearing metadata that is faster than individually opening and modifying the metadata in Edit books?
gol8erl8 is offline   Reply With Quote
Old 03-03-2020, 11:25 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
certain DC metadata tags is mandatory

I never figured why folk feel the need to strip out a few bytes.
I can see having those, that exist, Correct
theducks is online now   Reply With Quote
Advert
Old 03-03-2020, 11:30 AM   #3
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
Yea, it is not an existential crisis lol. I thought I would ask. From https://wiki.mobileread.com/wiki/Metadata , I understand that title, language, and identifier are required.
gol8erl8 is offline   Reply With Quote
Old 03-03-2020, 11:46 AM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by gol8erl8 View Post
<snip>

Is there a more thorough way of clearing metadata that is faster than individually opening and modifying the metadata in Edit books?
I check Remove non dc: metadata elements in the Modify Epub plugin dialogue. If I want to go further I use Sigil's Edit metadata tool - on single books.

BR
BetterRed is offline   Reply With Quote
Old 03-03-2020, 12:18 PM   #5
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
@BetterRed Thanks again for the great information. This time, unfortunately, I tested it on A Tale of Two Cities, both the original and after Edit metadata in bulk, and got the following error message:

Spoiler:
Code:
calibre, version 4.10.1 (linux, embedded-python: False)
Failed to modify ePubs: Failed: Modify ePubs

Modify ePubs
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 208, in main
    result = func(*args, **kwargs)
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 142, in arbitrary_n
    module = importlib.import_module(module_name)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 184, in load_module
    exec(compiled, mod.__dict__)
  File "calibre_plugins.modify_epub.jobs", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 180, in load_module
    import_name), 'exec', dont_inherit=True)
  File "calibre_plugins.modify_epub.modify", line 479
    new_html = re.sub(r'<\?xml([^\?]*?)\?><', r'<?xml\1?>\n<', new_html)
                                                                       ^
TabError: inconsistent use of tabs and spaces in indentation


On another note, I noticed some neat-sounding options in the Modify ePub plugin, including Remove calibre bookmark files. I was bothered that calibre remembered the last page viewed without knowing where it saved this data or how to clear it. I suppose calibre is writing to the individual ebooks, or perhaps their separate metadata.opf, when you view them. However, I haven't done a hash check.
gol8erl8 is offline   Reply With Quote
Advert
Old 03-03-2020, 01:29 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by gol8erl8 View Post
@BetterRed Thanks again for the great information. This time, unfortunately, I tested it on A Tale of Two Cities, both the original and after Edit metadata in bulk, and got the following error message:

Spoiler:
Code:
calibre, version 4.10.1 (linux, embedded-python: False)
Failed to modify ePubs: Failed: Modify ePubs

Modify ePubs
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 208, in main
    result = func(*args, **kwargs)
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 142, in arbitrary_n
    module = importlib.import_module(module_name)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 184, in load_module
    exec(compiled, mod.__dict__)
  File "calibre_plugins.modify_epub.jobs", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 180, in load_module
    import_name), 'exec', dont_inherit=True)
  File "calibre_plugins.modify_epub.modify", line 479
    new_html = re.sub(r'<\?xml([^\?]*?)\?><', r'<?xml\1?>\n<', new_html)
                                                                       ^
TabError: inconsistent use of tabs and spaces in indentation


On another note, I noticed some neat-sounding options in the Modify ePub plugin, including Remove calibre bookmark files. I was bothered that calibre remembered the last page viewed without knowing where it saved this data or how to clear it. I suppose calibre is writing to the individual ebooks, or perhaps their separate metadata.opf, when you view them. However, I haven't done a hash check.
You are the second person within the week that wanted the Viewer to not write into the book.

That is controlled from Preferences INSIDE the viewer.
theducks is online now   Reply With Quote
Old 03-03-2020, 01:35 PM   #7
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,021
Karma: 90000009
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
The mandatory metadata in EPUB varies by version. Newer versions require a modification date.

Metadata in AZW3 format is stored in an EXTH data structure. Calibre fakes the existence of an OPF for editing purposes, but some metadata fields do not translate exactly.
jhowell is offline   Reply With Quote
Old 03-03-2020, 03:09 PM   #8
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
Quote:
Originally Posted by theducks View Post
You are the second person within the week that wanted the Viewer to not write into the book.

That is controlled from Preferences INSIDE the viewer.
Thanks, @theducks. Sorry for any repeat questions.
gol8erl8 is offline   Reply With Quote
Old 03-03-2020, 03:12 PM   #9
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
Quote:
Originally Posted by jhowell View Post
The mandatory metadata in EPUB varies by version. Newer versions require a modification date.

Metadata in AZW3 format is stored in an EXTH data structure. Calibre fakes the existence of an OPF for editing purposes, but some metadata fields do not translate exactly.
I think many PG books are in EPUB v2, as I noticed I could use Polish books to upgrade them to v3. Also, this is probably why I see a date when I check a file exported with Save to disk or Send to device, and perhaps why I'm missing the aforementioned fields after converting to .AZW3. Appreciate it.
gol8erl8 is offline   Reply With Quote
Old 03-03-2020, 03:46 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by gol8erl8 View Post
@BetterRed Thanks again for the great information. This time, unfortunately, I tested it on A Tale of Two Cities, both the original and after Edit metadata in bulk, and got the following error message:


On another note, I noticed some neat-sounding options in the Modify ePub plugin, including Remove calibre bookmark files. I was bothered that calibre remembered the last page viewed without knowing where it saved this data or how to clear it. I suppose calibre is writing to the individual ebooks, or perhaps their separate metadata.opf, when you view them. However, I haven't done a hash check.
What flavour of linux and which version of calibre are you running?

BR
BetterRed is offline   Reply With Quote
Old 03-03-2020, 04:20 PM   #11
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
I'm using Fedora 31 inside of a virtual machine. I'm not using the latest version anymore, as I found calibre in my repository. It is version 4.10.1.
gol8erl8 is offline   Reply With Quote
Old 03-03-2020, 06:29 PM   #12
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by gol8erl8 View Post
@BetterRed Thanks again for the great information. This time, unfortunately, I tested it on A Tale of Two Cities, both the original and after Edit metadata in bulk, and got the following error message:

Spoiler:
Code:
calibre, version 4.10.1 (linux, embedded-python: False)
Failed to modify ePubs: Failed: Modify ePubs

Modify ePubs
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 208, in main
    result = func(*args, **kwargs)
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 142, in arbitrary_n
    module = importlib.import_module(module_name)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 184, in load_module
    exec(compiled, mod.__dict__)
  File "calibre_plugins.modify_epub.jobs", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 180, in load_module
    import_name), 'exec', dont_inherit=True)

File "calibre_plugins.modify_epub.modify", line 479
new_html = re.sub(r'<\?xml([^\?]*?)\?><', r'<?xml\1?>\n<', new_html)
^
TabError: inconsistent use of tabs and spaces in indentation
Hmmm- that's a bug in the code,

Click image for larger version

Name:	Annotation 2020-03-04 100707.jpg
Views:	160
Size:	119.2 KB
ID:	177489

Could you try installing the attached version of Modify

I wonder what your ePub has that causes it to follow that code path. Let me know if works (it works for me but I wasn't running up against the error), I have asked the person who changed the code last (Rev.Bob) to take a took at this thread, he is the person most familiar with code.

Interpreted languages that use code indentation to define scope ain't one of my favourite things - I'm more of a schnitzel with noodles sort of guy

BR
Attached Files
File Type: zip Modify ePub.zip (75.9 KB, 142 views)

Last edited by BetterRed; 03-03-2020 at 06:53 PM.
BetterRed is offline   Reply With Quote
Old 03-03-2020, 07:16 PM   #13
gol8erl8
Member
gol8erl8 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite 4
(Downloading plugins from a forum )

Thanks for taking the time to review the code, though I regret that I have a similar--if not an identical--error message:

Spoiler:
Code:
Modify ePubs
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 208, in main
    result = func(*args, **kwargs)
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 142, in arbitrary_n
    module = importlib.import_module(module_name)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 184, in load_module
    exec(compiled, mod.__dict__)
  File "calibre_plugins.modify_epub.jobs", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 180, in load_module
    import_name), 'exec', dont_inherit=True)
  File "calibre_plugins.modify_epub.modify", line 532
    if re.search(r'<pre\s*([^>]*?)>', html_text, re.I):
                                                      ^
TabError: inconsistent use of tabs and spaces in indentation


If I can offer more about the system that would cause such a headache, feel free to ask. And shoutouts to Python :/

Last edited by gol8erl8; 03-03-2020 at 07:19 PM.
gol8erl8 is offline   Reply With Quote
Old 03-03-2020, 07:44 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by gol8erl8 View Post
(Downloading plugins from a forum )

Thanks for taking the time to review the code, though I regret that I have a similar--if not an identical--error message:

Spoiler:
Code:
Modify ePubs
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 208, in main
    result = func(*args, **kwargs)
  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 142, in arbitrary_n
    module = importlib.import_module(module_name)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 184, in load_module
    exec(compiled, mod.__dict__)
  File "calibre_plugins.modify_epub.jobs", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/lib64/calibre/calibre/customize/zipplugin.py", line 180, in load_module
    import_name), 'exec', dont_inherit=True)
  File "calibre_plugins.modify_epub.modify", line 532
    if re.search(r'<pre\s*([^>]*?)>', html_text, re.I):
                                                      ^
TabError: inconsistent use of tabs and spaces in indentation


If I can offer more about the system that would cause such a headache, feel free to ask. And shoutouts to Python :/
No that's another bug in the code, but it's not obvious to me what it is.

What options did you check in Modify - did you check Deindent? if so try unchecking it and we might dodge that bullet for now

BTW all the plugins you can install from Preferences plugins originate from here.

BR

Last edited by BetterRed; 03-03-2020 at 07:50 PM.
BetterRed is offline   Reply With Quote
Old 03-03-2020, 07:59 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,612
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Please install the latest 'official' release of calibre from here ==>> calibre - Download for Linux

I was going to ask earlier but… maybe... who knows. Can't understand why these errors haven't showed up before now - the last update was in Oct 2019.

BR

Last edited by BetterRed; 03-03-2020 at 08:03 PM.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clear cache? odamizu Kindle Developer's Corner 8 04-11-2017 11:15 AM
Completely Automatic Download of Metadata? saefuob Library Management 3 03-07-2012 03:41 PM
Did I clear out Best Buy ? carpetmojo Sony Reader 8 11-13-2011 04:20 AM
Way to Clear Library? Lobonca Calibre 5 01-05-2010 04:24 PM


All times are GMT -4. The time now is 10:58 AM.


MobileRead.com is a privately owned, operated and funded community.