Sections
Timeline
Browse Source
New Ticket
Sub-Sections
Download
Comma-delimited Text
Tab-delimited Text
RSS Feed
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Ticket #7 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

Proxy failing due to missing "http://" in proxy settings

Reported by: evanlezar@… Owned by:
Priority: major Version: 0.2.0
Keywords: proxy Cc:

Description

The proxy request was failing when trying to read the images because my prosy was of the for "proxyhost:port" and not "http://proxyhost:port".

I noticed that although urllib2 was begin used to created the opener, the actual read was begin done by calling urllib.urlopen().read() instead.

Please find attached an SVN diff of the fix.

Thanks Evan

Attachments

Change History

follow-up: ↓ 3   Changed 5 months ago by evanlezar@…

ok, seem to have some trouble attaching a file - but here is the diff nonetheless.

Index: pygooglechart.py =================================================================== --- pygooglechart.py (revision 42) +++ pygooglechart.py (working copy) @@ -374,7 +374,8 @@

raise BadContentTypeException?('Server responded with a ' \

'content-type of %s' % opener.headerscontent-type?)

- open(file_name, 'wb').write(urllib.urlopen(self.get_url()).read()) + #open(file_name, 'wb').write(urllib.urlopen(self.get_url()).read()) + open(file_name, 'wb').write(opener.read())

# Simple settings # -------------------------------------------------------------------------

in reply to: ↑ description   Changed 5 months ago by anonymous

Replying to evanlezar@gmail.com:

The proxy request was failing when trying to read the images because my prosy was of the for "proxyhost:port" and not "http://proxyhost:port". I noticed that although urllib2 was begin used to created the opener, the actual read was begin done by calling urllib.urlopen().read() instead. Please find attached an SVN diff of the fix. Thanks Evan

Ok, the tracker is giving me hassles - probably firefox plugin issues :)

All the fix contains is changing the following line in pygooglechart.py (in Chart.download()) from

open(file_name, 'wb').write(urllib.urlopen(self.get_url()).read())

to

open(file_name, 'wb').write(opener.read())

Evan

in reply to: ↑ 1   Changed 3 months ago by gak

  • status changed from new to closed
  • resolution set to fixed

Replying to evanlezar@…:

Thanks for the patch. I have fixed this in trunk.

Add/Change #7 (Proxy failing due to missing "http://" in proxy settings)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.