Problems importing from Qbittorrent

Hi, thank you for this great piece of software! Reporting an issue I’ve been having with torrent downloads.

Sonarr version (exact version): 2.0.0.4427
Mono version (if Sonarr is not running on Windows):
OS: Windows 10
((Debug logs)): Will post if needed when this happens again, but the problem seems to be pretty clear, file in use.

Description of issue:

Randomly, Sonarr fails to import files from Qbittorrent (ver. 3.3.7). “Couldn’t import episode ********* The process cannot access the file because it is being used by another process.”

Qbittorrent is set to pause downloads and Sonarr set to remove. And it works more often than not.

I have enabled debug logging, and will add the log when this happens again. Torrent is my backup, so it might take a while. What I’ve noticed when monitoring torrent downloads, Qbittorrent reports lowering download speeds dozens of seconds after the file reaches 100% and status changes to complete. Maybe that has something to do with it?

After enabling debug log every torrent I tested manually finished and imported fine, so it’s quite random.

It’s likely locked because it’s still seeding in qBittorrent or it has a lock on the file for another reason. In either case Sonarr won’t be able to process the file if it is locked.

It’s not seeding when this happens, that was my first thought as well, and that’s why I disabled seeding in Qbittorrent settings. Weird thing is, most of the time it works like it should.

It may still have a lock on the file for a bit, before it releases it, if it keeps a lock on the files for a short period of time Sonarr will try again, if it’s locked on an ongoing basis it will prevent Sonarr from importing since Sonarr can’t do anything about the locked file.

Next time this happens, I will check if the file is locked indefinitely.

I have the same problem but it’s because sometimes the downloads aren’t labelled with tv-sobarr…no rynlme it reason why it doesn’t label

This happened again, and indeed qbitorrent kept locking the file even though it was 100% complete and paused. I guess it’s a qbittorrent bug.

I’ve come to say that I have this exact issue also.

The torrent will be status “Complete” (no activity at all) in qBittorent but Sonarr does not delete the file from qBittorrent so it can’t move the files to the correct directory.

If I delete the file from qBittorrent myself, it still does not move the file to the correct directory. Instead, I have to search for missing in Sonarr, it re-adds the torrent back to qBittorrent, then qBittorrent “checks” the file I already have downloaded, goes back to “Complete” status, and then Sonarr deletes it from qBittorrent and moves the file correctly.

This does NOT happen with all downloads, only sometimes. I have qBittorrent set to seed to 0.00 ratio and then pause, which gives me the “Complete” status.

Any ideas?

The real issue seems to be with Qbittorrent and remains unsolved. But as a workaround, I use “Drone Factory”.

I’ve set Qbittorrent to remove the download after it finishes and then it runs a script that makes Sonarr scan the drone factory folder (and this is where I’ve set Qbittorrent download Sonarr torrents to). I think it has failed once or twice, but seems to be working most of the time.

I think I have determined what the problem is.

When Sonarr adds a torrent to qBittorrent, it does not always apply the specific “Category” for Sonarr.

Sonarr will not touch downloads that aren’t in that “Category”.

Example: it searches for a missing TV show, adds the torrent. Torrent downloads just fine and goes to “Completed” status but does not get removed from qBittorrent because Sonarr does not mess with downloads not categorized as “tv-sonarr”. If I re-search for the show that’s missing while it’s “Completed” status in qBittorrent, it will add the “Category” on to the torrent, and remove the torrent from qBittorrent like it’s supposed to, and import the show to my library.

For me the problem is that the file stays locked for no reason. It is a known problem on Qbittorrent GitHub also.

Lately I too have been experiencing the label problem with Qbittorrent, it just doesn’t get applied some times and the download ends up in the download root folder and not in the correct category folder. And this of course breaks the method I’ve been using.(previous post)

This too is probably a Qbittorrent bug. Too bad, I have tried every supported torrent client for windows, and nothing seems to work the way I’d want it to. Qbittorrent came closest, hopefully these bugs will be solved in the future.

Edit: Just tried to use Qbittorrent like normal, and sure enough, file locked and not imported. Really frustrating.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.