06-01-2022, 07:07 AM | #1 |
Connoisseur
Posts: 78
Karma: 2138296
Join Date: Nov 2016
Device: ipad, Kindle Scribe, Kobo Libra 2
|
Python Error Message
Hi, Kevin,
When I try to rename a file, I get a Python error with this Traceback: Traceback (most recent call last): File "C:\Program Files/Sigil/python3lib\xmlprocessor.py", line 315, in performSMILUpdates fragment = urldecode(parts[1]) NameError: name 'urldecode' is not defined. Any suggestions? Jim |
06-01-2022, 07:59 AM | #2 |
Sigil Developer
Posts: 8,108
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Yes, most probably a bug someplace in Sigil's code that updates links. Most probably in code that updates links in smil files. That code does not get well tested as smil files are typically rare in our set of test epubs.
What version of Sigil are you using? I will look into it. |
06-01-2022, 08:18 AM | #3 |
Sigil Developer
Posts: 8,108
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Yes a bug in line 315 of xmlprocessor. It should use urldecodepart, not urldecode.
I will get that bug fix into the next release. If you are using Linux or Windows, you may be able to make that change directly in the xmlprocessor.py file. On macOS since it is codesigned, it will not allow you to make that change without the ability to re code sign it yourself. I can get you a fixed xmlprocessor.py file if you build your own or are willing to try it. The only way to work around the bug is to make a copy of the smil original file and remove all the fragments starting with # on its urls(parsing those fragments is where the bug is). Then do all your file renaming, then manually put back all of the previously removed url fragments by hand. Not easy at all. |
06-01-2022, 08:52 AM | #4 | |
Connoisseur
Posts: 78
Karma: 2138296
Join Date: Nov 2016
Device: ipad, Kindle Scribe, Kobo Libra 2
|
Quote:
It does not seem like a work-around is needed. The file-names were, in fact, renamed and the overlay is working despite a couple of errors reported by EpubCheck. So I'll just wait for the next release. I Will access-aide be updated to support audio files? I realize that this is not a very common scenario. Thanks Jim PS This is my first attempt at making an overlay for an ebook. |
|
06-01-2022, 01:25 PM | #5 | |
Sigil Developer
Posts: 8,108
Karma: 5450184
Join Date: Nov 2009
Device: many
|
This has now been fixed in Sigil master.
Access-Aide can not handle audio and video, as the software has no idea if any audio or video files have anything in them that may spur aural or visual issues by users (ie accessibility hazards). You can of course, run Access-Aide before adding any multimedia files and then properly update the metadata in the opf related to Accessibility by hand. In other words, properly manually update these: Quote:
Those types of judgements can only be made by the author/listener/watcher, not software like Access-Aide which is why Access-Aide stops when it detects these features being used. See: http://kb.daisy.org/publishing/docs/...ard.html#value Last edited by KevinH; 06-01-2022 at 01:38 PM. |
|
06-01-2022, 02:07 PM | #6 |
Connoisseur
Posts: 78
Karma: 2138296
Join Date: Nov 2016
Device: ipad, Kindle Scribe, Kobo Libra 2
|
Thanks, Kevin.
I see the problems with the audio for access-aide and it's easy enough to run the epub through the plugin before adding the .smil file. Thanks for the help and quick fix. Jim |
Tags |
python error, rename |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Python error message when loading Calibre | AJ Starr | Calibre | 5 | 11-17-2015 11:20 AM |
KindleGen error message: E1003 Unknown error in class String. | Doitsu | Kindle Formats | 1 | 06-25-2014 12:29 PM |
Running recipe error: Python function terminated unexpectedly (Error Code: 1) | jpassarella | Recipes | 0 | 10-05-2012 12:54 PM |
Python error message after update | Beau | Calibre | 19 | 01-15-2011 12:12 PM |
Python error message after update (another one) | jmatute | Calibre | 5 | 11-28-2010 01:02 AM |