Page 2 of 2
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 5:44 am
by shypike
Can you replace ...\Python27\lib\mimetypes.py with this file?
https://www.dropbox.com/s/zea2aql0032sx ... es.py?dl=0
(If you don't have a Dropbox account, just cancel the login box.)
With a bit of luck this will fix the problem, at least for the test you did for Sander.
It will not fix Alpha1 or Alpha2, for that I must create a new release.
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 5:47 am
by firesale
Here's the result of the first set of commands.
Code: Select all
Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.init()
>>> mimetypes.knownfiles
['/etc/mime.types', '/etc/httpd/mime.types', '/etc/httpd/conf/mime.types', '/etc
/apache/mime.types', '/etc/apache2/mime.types', '/usr/local/etc/httpd/conf/mime.
types', '/usr/local/lib/netscape/mime.types', '/usr/local/etc/httpd/conf/mime.ty
pes', '/usr/local/etc/mime.types']
>>> mimetypes.suffix_map['.tgz']
'.tar.gz'
>>> mimetypes.encodings_map['.gz']
'gzip'
>>> mimetypes.types_map['.tgz']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: '.tgz'
>>>
And the second set of commands.
Code: Select all
Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.init()
>>> mimetypes.types_map['.dwg']='image/x-dwg'
>>> mimetypes.types_map['.ico']='image/x-icon'
>>> mimetypes.types_map['.bz2']='application/x-bzip2'
>>> mimetypes.types_map['.gz']='application/x-gzip'
>>>
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 6:03 am
by firesale
shypike wrote:Can you replace ...\Python27\lib\mimetypes.py with this file?
https://www.dropbox.com/s/zea2aql0032sx ... es.py?dl=0
(If you don't have a Dropbox account, just cancel the login box.)
With a bit of luck this will fix the problem, at least for the test you did for Sander.
It will not fix Alpha1 or Alpha2, for that I must create a new release.
I downloaded mimetypes.py from the link above and put it in the indicated directory. These are the results from the test.
Code: Select all
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.init()
>>> mimetypes.knownfiles
['/etc/mime.types', '/etc/httpd/mime.types', '/etc/httpd/conf/mime.types', '/etc
/apache/mime.types', '/etc/apache2/mime.types', '/usr/local/etc/httpd/conf/mime.
types', '/usr/local/lib/netscape/mime.types', '/usr/local/etc/httpd/conf/mime.ty
pes', '/usr/local/etc/mime.types']
>>> mimetypes.suffix_map['.tgz']
'.tar.gz'
>>> mimetypes.encodings_map['.gz']
'gzip'
>>> mimetypes.types_map['.tgz']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: '.tgz'
>>>
Second set of commands:
Code: Select all
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.types_map['.dwg']='image/x-dwg'
>>> mimetypes.types_map['.ico']='image/x-icon'
>>> mimetypes.types_map['.bz2']='application/x-bzip2'
>>> mimetypes.types_map['.gz']='application/x-gzip'
>>>
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 6:39 am
by shypike
OK, it no longer crashes.
The last error ("KeyError: '.tgz'") is just an effect of Sander's test.
In SABnzbd's binaries, can you replace the file ...\lib\sabnzbd.zip with this one:
https://www.dropbox.com/s/1swsghdiew5bb ... d.zip?dl=0
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 7:11 am
by firesale
That fixed it. Works like a charm now.

Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 8:54 am
by shypike
firesale wrote:
That fixed it. Works like a charm now.

Great, I'll build a new Windows binary.
BTW: the cause is probably some (minor) corruption of your registry.
At least that is the claim in the Python bug report.
One of the MIME keys contains a NUL character in the name, which makes it an illegal name.
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 10:11 am
by sander
shypike wrote:firesale wrote:
That fixed it. Works like a charm now.

Great, I'll build a new Windows binary.
BTW: the cause is probably some (minor) corruption of your registry.
At least that is the claim in the Python bug report.
One of the MIME keys contains a NUL character in the name, which makes it an illegal name.
SP, can you give a pointer to that Python bug report?
Because I thought it was related to Unicode-values in the Windows registry.
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 11:57 am
by firesale
shypike wrote:firesale wrote:
That fixed it. Works like a charm now.

Great, I'll build a new Windows binary.
BTW: the cause is probably some (minor) corruption of your registry.
At least that is the claim in the Python bug report.
One of the MIME keys contains a NUL character in the name, which makes it an illegal name.
My computer might very well be due a re-install in the near future. Then again, Windows 10 is right around the corner and I might upgrade to that.

Thanks for all your hard work, guys! I appreciate it.
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 12:51 pm
by shypike
sander wrote:
SP, can you give a pointer to that Python bug report?
Because I thought it was related to Unicode-values in the Windows registry.
https://bugs.python.org/issue22028
There might still be cases of Unicode values, but in this case it was NUL characters.
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 1:12 pm
by shypike
Issue 22028 is the only one missing from 2.7.8.10 (ActiveState Python).
So Unicode should be covered.
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 1:42 pm
by sander
SP
Do you understand why it happens in SAB 0.8.0 alpha 2, and not SAB 0.7.20? Different python version? Different calling of "mimetypes"?
Is it related to
https://forums.sabnzbd.org/viewtopic.php?f=11&t=18976 ?
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 1:44 pm
by sander
firesale wrote:shypike wrote:firesale wrote:
Thanks for all your hard work, guys! I appreciate it.
Thank
you for the great cooperation!
Re: [0.8.0Alpha1] Does not start on Windows
Posted: June 10th, 2015, 1:45 pm
by shypike
Starting with Alpha1, we're using Python 2.7 instead of 2.5 for Windows builds.