IOError: Not a gzipped file

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
weedzer
Newbie
Newbie
Posts: 6
Joined: August 29th, 2012, 1:28 pm

IOError: Not a gzipped file

Post by weedzer »

Hi guys,

I've got some difficulties to add nzb from sabmobile 1.11.2 android app, i dunno if this problem is coming from a sabnzbd API bug or from the android application,
but this is my configuration and logs:

Version: 0.7.3
OS: Centos 6.3
Install-type: from sources, python from base centos repository
Skin (if applicable): Plush
Firewall Software: Default provider box, and shorewall 4.5.4-1
Are you using IPV6? yes
Is the issue reproducible? yes

2012-08-29 19:49:25,843::DEBUG::[interface:400] API-call from ::1 {'pp': '3', 'apikey': '*****', 'name': FieldStorage('name', 'ELEPHORM.ANDROID.FRENCH-M4NDR4K3.nzb', '\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03s-*\xca/\xb2R\xc8\xcbW(H,J\xccM-I-*\x06\x00\xfeoZ\x97\x14\x00\x00\x00\r\n'), 'priority': '0', 'mode': 'addfile', 'output': 'json'}
2012-08-29 19:49:25,844::INFO::[__init__:609] Adding ELEPHORM.ANDROID.FRENCH-M4NDR4K3.nzb
2012-08-29 19:49:25,846::WARNING::[dirscanner:158] Ne peut lire /tmp/tmpzESRlF.nzb
2012-08-29 19:49:25,847::INFO::[dirscanner:159] Traceback:
Traceback (most recent call last):
File "/var/sabnzbd/sabnzbd/dirscanner.py", line 155, in ProcessSingleFile
data = f.read()
File "/usr/lib/python2.6/gzip.py", line 212, in read
self._read(readsize)
File "/usr/lib/python2.6/gzip.py", line 255, in _read
self._read_gzip_header()
File "/usr/lib/python2.6/gzip.py", line 156, in _read_gzip_header
raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file

Thanks you :)
Alex.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: IOError: Not a gzipped file

Post by sander »

What if you add the .NZB via SAB's web interface? Does that work?

Does it only happen to this .NZB, or also to other NZBs?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: IOError: Not a gzipped file

Post by shypike »

Where does the NZB file come from?
Did you look at the content of ELEPHORM.ANDROID.FRENCH-M4NDR4K3.nzb ?
You should be able to open it with a text editor and it should be a readable XML file.
SABnzbd thinks it's a GZipped file, which is actually suggested by the two special bytes (\x1f\x8b)
at the beginning of the file.
weedzer
Newbie
Newbie
Posts: 6
Joined: August 29th, 2012, 1:28 pm

Re: IOError: Not a gzipped file

Post by weedzer »

It works by adding via web interface
2012-08-29 21:54:43,171::INFO::[__init__:609] Adding ELEPHORM.ANDROID.FRENCH-M4NDR4K3.nzb
2012-08-29 21:54:43,193::INFO::[nzbstuff:635] Replacing dots with spaces in ELEPHORM.ANDROID.FRENCH-M4NDR4K3
2012-08-29 21:54:43,193::INFO::[nzbstuff:638] Replacing spaces with underscores in ELEPHORM ANDROID FRENCH-M4NDR4K3
2012-08-29 21:54:43,194::INFO::[misc:792] Creating directories: /mnt/dl/tmp/ELEPHORM.ANDROID.FRENCH-M4NDR4K3
2012-08-29 21:54:45,653::INFO::[__init__:895] Saving data for queue9.sab in /root/.sabnzbd/admin/queue9.sab

but it doesn't via API used by android app :
2012-08-29 22:13:22,087::DEBUG::[interface:400] API-call from ::1 {'pp': '3', 'apikey': '***', 'name': FieldStorage('name', 'ELEPHORM.ANDROID.FRENCH-M4NDR4K3.nzb', '\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03s-*\xca/\xb2R\xc8\xcbW(H,J\xccM-I-*\x06\x00\xfeoZ\x97\x14\x00\x00\x00\r\n'), 'priority': '0', 'mode': 'addfile', 'output': 'json'}
2012-08-29 22:13:22,088::INFO::[__init__:609] Adding ELEPHORM.ANDROID.FRENCH-M4NDR4K3.nzb
2012-08-29 22:13:22,089::WARNING::[dirscanner:158] Ne peut lire /tmp/tmpXnWtfV.nzb
2012-08-29 22:13:22,089::INFO::[dirscanner:159] Traceback:
Traceback (most recent call last):
File "/var/sabnzbd/sabnzbd/dirscanner.py", line 155, in ProcessSingleFile
data = f.read()
File "/usr/lib/python2.6/gzip.py", line 212, in read
self._read(readsize)
File "/usr/lib/python2.6/gzip.py", line 255, in _read
self._read_gzip_header()
File "/usr/lib/python2.6/gzip.py", line 156, in _read_gzip_header
raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file
2012-08-29 22:14:08,782::DEBUG::[interface:400] API-call from ::1 {'pp': '3', 'apikey': '***', 'name': FieldStorage('name', 'DarksidersIISKIDROW.nzb', '\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03s-*\xca/\xb2R\xc8\xcbW(H,J\xccM-I-*\x06\x00\xfeoZ\x97\x14\x00\x00\x00\r\n'), 'priority': '0', 'mode': 'addfile', 'output': 'json'}
2012-08-29 22:14:08,783::INFO::[__init__:609] Adding DarksidersIISKIDROW.nzb
2012-08-29 22:14:08,784::WARNING::[dirscanner:158] Ne peut lire /tmp/tmptgNh5S.nzb
2012-08-29 22:14:08,784::INFO::[dirscanner:159] Traceback:
Traceback (most recent call last):
File "/var/sabnzbd/sabnzbd/dirscanner.py", line 155, in ProcessSingleFile
data = f.read()
File "/usr/lib/python2.6/gzip.py", line 212, in read
self._read(readsize)
File "/usr/lib/python2.6/gzip.py", line 255, in _read
self._read_gzip_header()
File "/usr/lib/python2.6/gzip.py", line 156, in _read_gzip_header
raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file


22:19:11-root@web:/opt$ ls -l /
drwxrwxrwt. 18 root root 4096 29 août 22:14 tmp
weedzer
Newbie
Newbie
Posts: 6
Joined: August 29th, 2012, 1:28 pm

Re: IOError: Not a gzipped file

Post by weedzer »

It comes from generate nzb file from binsearch search, i try another one
weedzer
Newbie
Newbie
Posts: 6
Joined: August 29th, 2012, 1:28 pm

Re: IOError: Not a gzipped file

Post by weedzer »

Empty file with nzbindex :/

2012-08-29 22:25:47,576::DEBUG::[interface:400] API-call from ::1 {'pp': '3', 'apikey': '***', 'name': FieldStorage('name', 'DarksidersIISKIDROW.par2.nzb', '<?xml version="1.0" encoding="iso-8859-1" ?>\n<!DOCTYPE nzb PUBLIC "-//newzBin//DTD NZB 1.0//EN" "http://www.nzbindex.com/nzb-1.0.dtd">\n<!-- NZB Generated by NZBIndex -->\n<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">\n</nzb>\r\n\r\n'), 'priority': '0', 'mode': 'addfile', 'output': 'json'}
2012-08-29 22:25:47,577::INFO::[__init__:609] Adding DarksidersIISKIDROW.par2.nzb
2012-08-29 22:25:47,578::INFO::[nzbstuff:635] Replacing dots with spaces in DarksidersIISKIDROW.par2
2012-08-29 22:25:47,578::INFO::[nzbstuff:638] Replacing spaces with underscores in DarksidersIISKIDROW par2
2012-08-29 22:25:47,579::INFO::[misc:792] Creating directories: /mnt/dl/tmp/DarksidersIISKIDROW.par2
2012-08-29 22:25:47,580::INFO::[__init__:565] Backing up /mnt/dl/tmp/DarksidersIISKIDROW.par2.nzb.gz
2012-08-29 22:25:47,581::INFO::[__init__:565] Backing up /mnt/dl/tmp/DarksidersIISKIDROW.par2/__ADMIN__/DarksidersIISKIDROW.par2.nzb.gz
2012-08-29 22:25:47,582::WARNING::[nzbstuff:702] Fichier NZB DarksidersIISKIDROW.par2.nzb vide [DarksidersIISKIDROW.par2.nzb]
weedzer
Newbie
Newbie
Posts: 6
Joined: August 29th, 2012, 1:28 pm

Re: IOError: Not a gzipped file

Post by weedzer »

oh the problem is that there is no extension nzb.gz
22:35:00-root@web:/opt$ cat /tmp/tmpXnWtfV.nzb
s-*▒/▒R▒▒W(H,J▒M-I-*▒oZ▒
22:35:04-root@web:/opt$ file /tmp/tmpzESRlF.nzb
/tmp/tmpzESRlF.nzb: gzip compressed data, from Unix
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: IOError: Not a gzipped file

Post by shypike »

Hmm, does it un-gzip properly?
SABnzbd already tries to decode incorrectly named nzb.gz files,
by looking for the "magic" bytes signalling a GZ file.

I was just writing this before you sent your last message:
I suspect the Android app.
It looks like it uses a HTTP-level compression method that the SABnzbd-side doesn't understand.
The protocol is negotiated at the protocol level by the third-party web-framework
we use and the Android app. Something goes wrong in that negotiation.
You should also report this to the app author, since I cannot test this.
weedzer
Newbie
Newbie
Posts: 6
Joined: August 29th, 2012, 1:28 pm

Re: IOError: Not a gzipped file

Post by weedzer »

OK that's it,
I already report this to the app author with a link to this post :)

Thanks you very much.
Post Reply