ThreaadingViolation when the button "Change anallyzed folder" is pressed

Bug #2068832 reported by Edoardo Barolo

This bug report will be marked for expiration in 44 days if no further activity occurs. (find out why)

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Incomplete
Undecided
Unassigned

Bug Description

Hello, I have the latest version (7.12.0) on Windows 11.

I plugged my cellphone into the USB and enabled USB File Transfer. Calibre detects both my internal memory and my SD card. I have ebooks in a different folder, so I clicked the "Configure device" button and accessed the menu. I then clicked on "Change the directory to be analyzed" (I have the Italian version, so this might be worded differently).

After that, I received an error popup saying:

calibre, version 7.12.0
ERRORE: Eccezione non gestita: <b>ThreadingViolation</b>:

You cannot use the MTP driver from a thread other than the thread in which startup() was called

calibre 7.12 embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: it
EXE path: C:\Program Files\Calibre2\calibre.exe
Successfully initialized third party plugins: Extract ISBN (1, 6, 3)
Traceback (most recent call last):
  File "calibre\gui2\device_drivers\mtp_config.py", line 453, in change_ignored_folders
  File "calibre\gui2\device_drivers\mtp_folder_browser.py", line 118, in __init__
  File "calibre\devices\mtp\windows\driver.py", line 258, in filesystem_cache
  File "calibre\devices\mtp\windows\driver.py", line 36, in check_thread
calibre.devices.mtp.windows.driver.ThreadingViolation: You cannot use the MTP driver from a thread other than the thread in which startup() was called

Edoardo Barolo (velteyn)
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote :

I am travelling for a week so cant look at hardware related issues, but
when I return I will investigate. Although I dont have any MTP devices
that support SD cards, so if the issue is specific to that it might not
be fixable by me. In the meantime as a workaround you can eject the sd
card from the device and use an sd card reader and the "connect to
folder" function in calibre to send books to it.

Revision history for this message
Kovid Goyal (kovid) wrote :

Doesnt reproduce for me. However I dont have an MTP device with an SD
card to test with, though I dont see why that should make any diffrence
to this error. Does it still happen for you if you first remove the SD
card?

Changed in calibre:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.