Extractor not working in Windows 10

Specific support for Deluge on Microsoft Windows OS
thesmj

Re: Extractor not working in Windows 10

Post by thesmj »

The plugin isn't working in Windows 7 either. I've tried installing the 32-bit version of 7zip to no avail.
User avatar
Geth
Member
Member
Posts: 12
Joined: Sun May 08, 2016 3:04 pm
Location: Budapest, Hungary

Re: Extractor not working in Windows 10

Post by Geth »

Hi,

This problem has a related topic with eerily similar problem (Linux and unrar instead of 7zip and Windows).
Attached there is a work-in-progress version of the plugin (0.5a1), which is working for me, apart from the log stating failed, but the extraction is successful and the files are there. This flipped logic (which is still wrong in 0.5a1) causes that we see success in the logs, but in reality it's a failed operation. Funny :)

Technical details: previously (before 0.5a1) plugin spawned extraction subprocess with empty environment, so PATH may not be exactly the same in the process as when you just try the extraction command manually (say in a cmd window). Curiously, upon plugin loading, it uses a different method to initialize available extractors. So it can find it in initializion phase, but fails to call it when it actually has to extract something.
Now the Windows part (I'm using Windows, but not Deluge on it, so it may be total bullshit):
I saw in the source, that it's trying different methods to come to a conclusion whether 7zip is available on the system or not.
There are some registry reading, I'm not totally confident that it's correct, maybe on a 64bit system it should try to read both 64bit and 32bit registry keys, because 7zip bitness is not required to match the system's. Maybe it's done the right way, I don't know.
BUT, if registry reading is done, it inserts the result in the SECOND place in the list of potential 7zip commands, not the first place.
Imagine, that 7zip is added to the user PATH, not the system PATH.
In that case, initialization will find it with simple "7z.exe" (which is still the first in the list) and not with result from the registry reading or the hardcoded default paths.
When subprocess spawns (with empty environment in plugin versions prior to 0.5a1), the user PATH will not be available to the process, only the system PATH (I think).
That will cause failure ('7z.exe' is not recognized as an internal or external command blahblah), and with the flipped logic, log will state success.
Nasty.
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Extractor not working in Windows 10

Post by Cas »

I have updated the ticket as Fixed and attached the updated plugin to it: http://dev.deluge-torrent.org/ticket/2785
sVE1
New User
New User
Posts: 6
Joined: Mon Jun 20, 2016 11:37 am

Re: Extractor not working in Windows 10

Post by sVE1 »

I recently converted from utorrent to deluge. So my knowledge is kinda limited. But I'm running into the same problems that some of the others have.

Some files extract fine, no problem. Others don't. So far I've seen no logic on what works and what's not.

I ran a session in debug mode and these lines keeps popping up when it don't work:

Code: Select all

  File "logging/__init__.py", line 859, in emit
  File "logging/__init__.py", line 732, in format
  File "logging/__init__.py", line 471, in format
  File "logging/__init__.py", line 335, in getMessage
UnicodeDecodeError: 'utf8' codec can't decode byte 0x86 in position 141: invalid start byte
Logged from file core.py, line 168
A little info on what I'm running: Deluge 1.3.12-1, python 2.7. I've deleted manually the 2.6 .egg for the extractor. Extractor states 0.5 in plugins. 7zip 16.02 and 7zip 16.02 (x64) installed, have tried various combo's of this installed, Windows 10.

My downloads go to d:\download\torrents and I've setup extractor so that it should unrar everything in its own folder to d:\completed for further processing.

I had the same problem running Deluge 1.3.12-1, python 2.6, but when I ran that, I did not run the latest extractor. Found that info after I upgraded.

Hope this can give you some clues on whats going on. If you need anything else, please let me know!

/sven
Last edited by Cas on Mon Jun 20, 2016 4:38 pm, edited 1 time in total.
Reason: Use [code][/code] tags!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Extractor not working in Windows 10

Post by Cas »

You need to provide the full error log output but it looks from that you are still using the old plugin and that log error message is not part of the issue
sVE1
New User
New User
Posts: 6
Joined: Mon Jun 20, 2016 11:37 am

Re: Extractor not working in Windows 10

Post by sVE1 »

First of all, if I'm not running the latest extractor. Could you please instruct me how to do so. I've deleted the ones i the pyton folder, and also the one in my appdata\plugins folder. When I start Deluge, there is no Extractor options in plugins after this has been done. I then download the file provided in your link and import that. States 0.5. I see from some other screenshots that it states 0.51a or something.. What am I doing wrong?

Code: Select all

[DEBUG   ] 17:44:55 configmanager:111 Getting config 'gtkui.conf'
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r00
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r01
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r02
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: Lfilename.filename-group/filename.filename-group.r03
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r04
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r05
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r06
[DEBUG   ] 17:44:55 core:171 EXTRACTOR: Extracting D:\Torrents\filename.filename-group\filename.filename-group.rar from 48d948a15e6413ee0cbe5d09f8e4d1304d2cb581 with C:\Program Files\7-Zip\7z.exe x -y to D:\Completed\filename.filename-group
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.sfv
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.nfo
Do you need more of the log?

D:\Torrents\filename.filename-group\ was created, nothing else.

Regarding the error, I'm not saying it is part of it. But just to mention it, this error occours exactly the same time as it is suppose to unrar it. It might be urelated but i just wanted to mention it, just in case.

/sven
Last edited by Cas on Mon Jun 20, 2016 4:38 pm, edited 1 time in total.
Reason: Use [code][/code] tags!
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Extractor not working in Windows 10

Post by Cas »

That looks like it's from v0.5 but yes more of the log, need all the log relevant to Extractor plugin...

The other error might be relevant but again you need to provide all of the output. Are non-ascii character in the path or torrent name, you appear to have modified the logs so I cannot make any suggestions.
sVE1
New User
New User
Posts: 6
Joined: Mon Jun 20, 2016 11:37 am

Re: Extractor not working in Windows 10

Post by sVE1 »

I've copied out most of what searches for "extractor" gives me in the log. If you need the full log, I would have to send it to you private.

Code: Select all

[DEBUG   ] 17:41:31 pluginmanagerbase:124 Found plugin: Extractor 0.5 at c:\users\sven\appdata\roaming\deluge\plugins\extractor-0.5-py2.7.egg
[DEBUG   ] 17:41:33 rpcserver:396 Registering method: extractor.get_config
[DEBUG   ] 17:41:33 rpcserver:396 Registering method: extractor.set_config
[DEBUG   ] 17:41:33 configmanager:111 Getting config 'extractor.conf'
[DEBUG   ] 17:41:33 config:197 Setting 'use_name_folder' to True of <type 'bool'>
[DEBUG   ] 17:41:33 config:197 Setting 'extract_path' to  of <type 'str'>
[DEBUG   ] 17:41:33 config:391 Config C:\Users\SvenAppData\Roaming\deluge\extractor.conf version: 1.1 loaded: {'use_name_folder': True, 'extract_path': u'D:\\'}
[INFO    ] 17:41:33 pluginmanagerbase:158 Plugin Extractor enabled..
[DEBUG   ] 17:41:33 rpcserver:467 intevents: {}
[DEBUG   ] 17:41:33 pluginbase:62 GtkPlugin initialized..
[DEBUG   ] 17:41:33 pluginmanagerbase:156 Adding Extractor to enabled_plugins list in config
[INFO    ] 17:41:33 pluginmanagerbase:158 Plugin Extractor enabled..
[DEBUG   ] 17:41:33 pluginmanager:104 run_on_show_prefs
[DEBUG   ] 17:41:33 label_config:77 options={}
[DEBUG   ] 17:41:33 pluginbase:77 WebPlugin initialized..
[DEBUG   ] 17:41:33 pluginmanagerbase:156 Adding Extractor to enabled_plugins list in config
[INFO    ] 17:41:33 pluginmanagerbase:158 Plugin Extractor enabled..
[DEBUG   ] 17:41:33 pluginmanager:115 adding script Extractor for extractor.js
[DEBUG   ] 17:41:33 pluginmanager:119 adding debug script Extractor for extractor.js
[DEBUG   ] 17:41:33 configmanager:111 Getting config 'core.conf'
[DEBUG   ] 17:41:33 torrentmanager:632 Opening torrent state file for load.
[WARNING ] 17:41:36 pluginmanagerbase:134 Cannot enable already enabled plugin Extractor
[WARNING ] 17:41:36 pluginmanagerbase:134 Cannot enable already enabled plugin WebUi
[WARNING ] 17:41:36 pluginmanagerbase:134 Cannot enable already enabled plugin Label
[DEBUG   ] 17:43:18 component:256 Deregistering Component: WebPlugin.Extractor
[INFO    ] 17:43:18 pluginmanagerbase:170 Plugin Extractor disabled..
[DEBUG   ] 17:43:18 component:256 Deregistering Component: WebPlugin.Label
[INFO    ] 17:43:18 pluginmanagerbase:170 Plugin Label disabled..
[DEBUG   ] 17:43:18 server:689 Saving configuration file
[DEBUG   ] 17:43:18 gtkui:66 applying prefs for Extractor
[DEBUG   ] 17:43:18 config:216 Setting 'extract_path' to D:\Completed of <type 'unicode'>
[DEBUG   ] 17:43:18 config:423 Saving new config file C:\Users\Sven\AppData\Roaming\deluge\extractor.conf.new
[DEBUG   ] 17:43:18 config:436 Backing up old config file to C:\Users\Sven\AppData\Roaming\deluge\extractor.conf~
[DEBUG   ] 17:43:18 config:444 Moving new config file C:\Users\Sven\AppData\Roaming\deluge\extractor.conf.new to C:\Users\Sven\AppData\Roaming\deluge\extractor.conf..
[DEBUG   ] 17:43:19 gtkui:66 applying prefs for Extractor
[DEBUG   ] 17:44:55 configmanager:111 Getting config 'gtkui.conf'
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r00
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r01
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r02
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: Lfilename.filename-group/filename.filename-group.r03
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r04
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r05
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.r06
[DEBUG   ] 17:44:55 core:171 EXTRACTOR: Extracting D:\Torrents\filename.filename-group\filename.filename-group.rar from 48d948a15e6413ee0cbe5d09f8e4d1304d2cb581 with C:\Program Files\7-Zip\7z.exe x -y to D:\Completed\filename.filename-group
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.sfv
[DEBUG   ] 17:44:55 core:147 EXTRACTOR: Can't extract file with unknown file type: filename.filename-group/filename.filename-group.nfo
sVE1
New User
New User
Posts: 6
Joined: Mon Jun 20, 2016 11:37 am

Re: Extractor not working in Windows 10

Post by sVE1 »

I did a little more testing. I'm now running Extractor 0.5a1. The reason I was not running that, is that the ticket you referred to; http://dev.deluge-torrent.org/ticket/2785 links to the old 0.5 version. I went into http://forum.deluge-torrent.org/viewtop ... 7&start=10 and grabbed the version you posted there, Extractor-0.5a1-py2.7.egg. Directly from your first post on page 2.

After installing that version, everything works like a charm! Maybe you did attatch the wrong file, and that is the reason for the confusion some are having.

Anyways.. thanks for the fix!

/sven
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Extractor not working in Windows 10

Post by Cas »

Well that makes no sense as 0.5 is the latest version (0.5a1 is alpha version) and there is no difference in the actual code between them other than fix transposed log success and fail and that is after the command has been run...
Post Reply