View Single Post
Old 08-16-2022, 08:09 AM   #2793
PetBest
Enthusiast
PetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toys
 
Posts: 41
Karma: 5658
Join Date: Jun 2022
Device: Kobo Libra 2
Solving concurrent.futures._base.TimeoutError for large file transfer via USB

Hi All,
I get on my huge generated Catalog epub file (>24MB large exact 24.606KB) the following error after about 2 minutes and 17 seconds. I solved this by adapting the timeout parameter in python program container.py. See below how.

My environment: Windows 10, Calibre 6.3.0, KoboTouchExtended plugin 3.6.3

Solving TimeoutError
=============
Open with 7-Zip file C:\Users\<your user name>\AppData\Roaming\calibre\plugins\KoboTouchExt ended.zip
Edit file container.py at line 377 column 50 and change it:
original line: name = future.result(timeout=10)
adapted line: name = future.result(timeout=100)
Save and close 7-Zip
Restart Calibre

Probably timeout=50 or less would be fine as well. Simply try the value yourself.

Error log
======
Failed to process Mybooks by calibre:

Traceback (most recent call last):
File "calibre_plugins.kobotouch_extended.device.driver" , line 268, in _modify_epub
File "calibre_plugins.kobotouch_extended.common", line 236, in modify_epub
File "calibre_plugins.kobotouch_extended.container" , line 398, in convert
File "calibre_plugins.kobotouch_extended.container" , line 394, in __run_async_over_content
File "calibre_plugins.kobotouch_extended.container" , line 381, in __run_async
File "calibre_plugins.kobotouch_extended.container" , line 377, in __run_async
File "concurrent\futures\_base.py", line 447, in result
concurrent.futures._base.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\gui2\device.py", line 88, in run
File "calibre\gui2\device.py", line 620, in _upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 426, in upload_books
File "calibre\devices\kobo\driver.py", line 2214, in upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 294, in _modify_epub
File "calibre_plugins.kobotouch_extended.device.driver" , line 268, in _modify_epub
File "calibre_plugins.kobotouch_extended.common", line 236, in modify_epub
File "calibre_plugins.kobotouch_extended.container" , line 398, in convert
File "calibre_plugins.kobotouch_extended.container" , line 394, in __run_async_over_content
File "calibre_plugins.kobotouch_extended.container" , line 381, in __run_async
File "calibre_plugins.kobotouch_extended.container" , line 377, in __run_async
File "concurrent\futures\_base.py", line 447, in result
concurrent.futures._base.TimeoutError: Failed to process Mybooks by calibre:

Last edited by PetBest; 08-16-2022 at 08:13 AM.
PetBest is offline   Reply With Quote