It seems to me the problem is with the server you try to fetch from.

On Sep 13, 4:59 pm, Thadeus Burgess <[email protected]> wrote:
> Using fetch(url) raises BadStatusLine on the url
>
> Is there a way around this so that even when no status line is returned it
> will still continue to download the file?
>
> I tried using httplib.HTTPConnection(strict=False) and it still raises
> BadStatusLine.
>
> I cannot change the status codes comming from the remote server, it does
> return data, just no status codes or headers.
>
> Traceback (most recent call last):
>   File "/home/thadeusb/Workspace/web2py/gluon/restricted.py", line
> 178, in restricted
>
>     exec ccode in environment
>   File 
> "/home/thadeusb/Workspace/web2py/applications/init/controllers/bootygrab.py"
> <http://127.0.0.1:8000/admin/default/edit/init/controllers/bootygrab.py>,
> line 197, in <module>
>
>   File "/home/thadeusb/Workspace/web2py/gluon/globals.py", line 101, in 
> <lambda>
>
>     self._caller = lambda f: f()
>
>   File 
> "/home/thadeusb/Workspace/web2py/applications/init/controllers/bootygrab.py"
> <http://127.0.0.1:8000/admin/default/edit/init/controllers/bootygrab.py>,
> line 150, in index
>
>     update_new_tanks()
>   File 
> "/home/thadeusb/Workspace/web2py/applications/init/controllers/bootygrab.py"
> <http://127.0.0.1:8000/admin/default/edit/init/controllers/bootygrab.py>,
> line 140, in update_new_tanks
>
>     update_tanks(tanks)
>   File 
> "/home/thadeusb/Workspace/web2py/applications/init/controllers/bootygrab.py"
> <http://127.0.0.1:8000/admin/default/edit/init/controllers/bootygrab.py>,
> line 135, in update_tanks
>
>     scan_booty(tank.booty.id)
>   File 
> "/home/thadeusb/Workspace/web2py/applications/init/controllers/bootygrab.py"
> <http://127.0.0.1:8000/admin/default/edit/init/controllers/bootygrab.py>,
> line 79, in scan_booty
>
>     tank_data = read_tank(url)#fetch(url)#urllib.urlopen(url, timeout=10)
>
>   File 
> "/home/thadeusb/Workspace/web2py/applications/init/controllers/bootygrab.py"
> <http://127.0.0.1:8000/admin/default/edit/init/controllers/bootygrab.py>,
> line 65, in read_tank
>
>     response = conn.getresponse()
>   File "/usr/lib/python2.6/httplib.py", line 950, in getresponse
>
>     response.begin()
>   File "/usr/lib/python2.6/httplib.py", line 390, in begin
>
>     version, status, reason = self._read_status()
>
>   File "/usr/lib/python2.6/httplib.py", line 354, in _read_status
>
>     raise BadStatusLine(line)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to