Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-01-2022, 07:07 AM   #1
oston
Connoisseur
oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.
 
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
oston is offline   Reply With Quote
Old 06-01-2022, 07:59 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 06-01-2022, 08:18 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 06-01-2022, 08:52 AM   #4
oston
Connoisseur
oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.
 
Posts: 78
Karma: 2138296
Join Date: Nov 2016
Device: ipad, Kindle Scribe, Kobo Libra 2
Quote:
Originally Posted by KevinH View Post
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.
I am using 1.9.10 , Kevin.
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.
oston is offline   Reply With Quote
Old 06-01-2022, 01:25 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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:
schema:accessMode: textual
schema:accessMode: visual
schema:accessModeSufficient: textual
schema:accessibilityFeature: structuralNavigation
schema:accessibilitySummary: This publication conforms to WCAG 2.0 AA.
schema:accessibilityHazard: none
The correct settings depend on exactly what multimedia elements you have added and whether they contain any hazards such as flashing images, etc.

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.
KevinH is offline   Reply With Quote
Old 06-01-2022, 02:07 PM   #6
oston
Connoisseur
oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.oston ought to be getting tired of karma fortunes by now.
 
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
oston is offline   Reply With Quote
Reply

Tags
python error, rename


Forum Jump

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


All times are GMT -4. The time now is 09:03 AM.


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