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-10-2021, 04:14 AM   #1
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
Editing TOC get ValueError: invalid literal for int() with base 10: ''

When I add an entry in editing ToC, an error message pops up:

ValueError: invalid literal for int() with base 10: ''
This only happens to a specific epub book, which is in the attachment.

I'm using the latest version, v5.13 x64, on windows 10.

Could anyone help?

Last edited by BetterRed; 03-12-2021 at 02:43 PM. Reason: Remove copyrighted book
davidhcje is offline   Reply With Quote
Old 03-10-2021, 07:50 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
works for me, post the full error message u get. click the show details on the error popup
kovidgoyal is offline   Reply With Quote
Advert
Old 03-11-2021, 10:43 PM   #3
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
Error message got while editing the TOC

calibre, version 5.13.0
ERROR: Unhandled exception: <b>ValueError</b>:invalid literal for int() with base 10: ''

calibre 5.13 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Traceback (most recent call last):
File "calibre\gui2\actions\toc_edit.py", line 168, in check_for_completions
ValueError: invalid literal for int() with base 10: ''
davidhcje is offline   Reply With Quote
Old 03-12-2021, 02:53 PM   #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: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidhcje View Post
calibre, version 5.13.0
ERROR: Unhandled exception: <b>ValueError</b>:invalid literal for int() with base 10: ''

calibre 5.13 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Traceback (most recent call last):
File "calibre\gui2\actions\toc_edit.py", line 168, in check_for_completions
ValueError: invalid literal for int() with base 10: ''
Moderator Notice
I removed the attachment in the first post, see Guideline #8


How did you try to change the ToC, by using the ToC editing tool or manually? If you were using the tool, which option were you using, a screen shot might help.

BR
BetterRed is offline   Reply With Quote
Old 03-13-2021, 01:06 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that's an odd error message. Opena bug report and attach the file there, I will see if I can reproduce on a windows system. It doesnt hapen for me on linux.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-13-2021, 02:18 AM   #6
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: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Hmm that's an odd error message. Opena bug report and attach the file there, I will see if I can reproduce on a windows system. It doesnt hapen for me on linux.
Kovid - Didn't happen for me on Windows - mind you I only used a couple of options.

BR
BetterRed is offline   Reply With Quote
Old 03-13-2021, 02:59 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm the only way i can think of for that error to happen is if the worker process that shows that dialog is killed or crashes. Maybe an aggressive A/V??
kovidgoyal is offline   Reply With Quote
Old 03-13-2021, 04:53 AM   #8
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
Quote:
Originally Posted by BetterRed View Post
I removed the attachment in the first post, see Guideline #8

How did you try to change the ToC, by using the ToC editing tool or manually? If you were using the tool, which option were you using, a screen shot might help.

BR
I used ToC editing tool to add new entry. All three options to add new entry led to this error.
davidhcje is offline   Reply With Quote
Old 03-13-2021, 05:00 AM   #9
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
Here is the screenshots.
https://thefantasticprincessbouquet....a-new-entry-in
davidhcje is offline   Reply With Quote
Old 03-13-2021, 08:46 AM   #10
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
I've submitted a bug report here:
https://bugs.launchpad.net/calibre/+bug/1919025
davidhcje is offline   Reply With Quote
Old 03-13-2021, 03:51 PM   #11
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: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Kovid is on R&R for a few days.

But it works for me, viz:

Click image for larger version

Name:	Screenshot 2021-03-14 072735.jpg
Views:	160
Size:	129.8 KB
ID:	185927

My Setup
Calibre 5.13
Windows 10 Pro, Version: 20H2, OS build: 19042.867
Security: AV etc: MS Defender; Firewall:Microsoft; Malwarebytes 4.3.0

Try disabling your AV software or adding calibre to its exclusion list.

BR
BetterRed is offline   Reply With Quote
Old 03-14-2021, 09:41 AM   #12
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
I use Norton. But adding calibre-parallel.exe in the whitelist of Norton didn't help.

This seems like a python error, which reminds me of a similar error occured in an another Python-related software, QGIS.
Weeks ago I changed my user folder name. Although I followed a microsoft tutorial to do that, when I ran QGIS later, a Python error occurred, as shown in the image below:
https://thefantasticprincessbouquet....38766267170816

This error in QGIS was solved by creating a new user account in QGIS. I don't know if that error resemble to the one I encountered in Calibre.

Last edited by davidhcje; 03-14-2021 at 09:45 AM. Reason: picture doesn't show
davidhcje is offline   Reply With Quote
Old 03-14-2021, 10:11 AM   #13
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
I don't think renaming the user folder is the case though, since I just tried on another 2 PCs, and the problem persisted.
Another possible reason I could think of is that I put my library in OneDrive. Could that be the cause?
davidhcje is offline   Reply With Quote
Old 03-14-2021, 10:32 AM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, that is most likely the cause. See https://manual.calibre-ebook.com/faq...rked-drive-nas
kovidgoyal is offline   Reply With Quote
Old 03-28-2021, 04:50 AM   #15
davidhcje
Connoisseur
davidhcje began at the beginning.
 
Posts: 74
Karma: 10
Join Date: Mar 2021
Device: android phone
Great! I closed OneDrive temporarily, then edited the TOC and it worked.
davidhcje is offline   Reply With Quote
Reply

Tags
debugging, epub, toc error, valueerror


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing in TOC pane AlanHK Sigil 11 02-16-2018 01:28 AM
Invalid TOC links in some azw3 files darryl Kindle Formats 53 05-12-2015 08:11 PM
Editing toc exaltedwombat Sigil 4 10-14-2012 01:57 PM
Redundant/Invalid TOC entries Stinger Kobo Reader 4 06-26-2010 09:02 PM
patch: LrfError: page id invalid in toc grimborg Calibre 0 04-07-2010 05:22 AM


All times are GMT -4. The time now is 07:10 PM.


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