Closed GoogleCodeExporter closed 8 years ago
There is an article "Using Proxy Servers with the Google Data API Client
Libraries", but it was written in 2007 and, alas, doesn't mention Python.
Original comment by willison...@googlemail.com
on 21 Jun 2010 at 6:33
I have the same issue.
Are there any chances the proxy support will be implemented soon?
Original comment by anten...@gmail.com
on 21 Jun 2010 at 7:59
I solved the issue on my PC...
I downloaded and installed an updated version of python gdata (gdata-2.0.10)
and then I set the http_proxy and https_proxy variables (both).
Original comment by anten...@gmail.com
on 21 Jun 2010 at 8:53
I set both http_proxy and https_proxy in my env, but I still get the same error:
C:\Docs\Apps\Python26> google docs list
Please specify user: ******
Traceback (most recent call last):
File "C:\Docs\Apps\Python26\googlecl-0.9.7\src\google", line 463, in <module>
main()
File "C:\Docs\Apps\Python26\googlecl-0.9.7\src\google", line 457, in main
run_once(options, args)
File "C:\Docs\Apps\Python26\googlecl-0.9.7\src\google", line 340, in run_once
if client.RequestAccess():
File "C:\Docs\Apps\Python26\googlecl-0.9.7\src\googlecl\service.py", line 198, in request_access
request_token = self.FetchOAuthRequestToken(extra_parameters=params)
File "C:\Docs\Apps\Python26\lib\site-packages\gdata\service.py", line 416, in FetchOAuthRequestToken
response = self.http_client.request('GET', str(request_token_url))
File "C:\Docs\Apps\Python26\lib\site-packages\atom\http.py", line 132, in request
connection = self._prepare_connection(url, all_headers)
File "C:\Docs\Apps\Python26\lib\site-packages\atom\http.py", line 240, in _prepare_connection
p_sock.connect((proxy_url.host, int(proxy_url.port)))
File "<string>", line 1, in connect
TypeError: coercing to Unicode: need string or buffer, NoneType found
I am using these versions, on win xp (32bit):
- python-2.6.5 (on a non-standard path: C:\Docs\Apps\Python26)
- gdata-2.0.10
- googlecl-0.9.7
Original comment by ber...@gmail.com
on 21 Jun 2010 at 3:25
Works for me behind a proxy.
What user-agent is being passed? Sometimes (this happened to me recently) a
proxy will check for an authorized user-agent.
python 2.5.6
Gdata 2.0.10
googecl 0.9.7
Original comment by timet...@gmail.com
on 21 Jun 2010 at 5:31
After installing Gdata 2.0.10 it now works.
Original comment by jckeert...@gmail.com
on 21 Jun 2010 at 10:27
I'll add this information to the FAQ. Thanks to everyone who reported in with
problems and the solution.
Has anyone else had a problem with operating googlecl behind a proxy after
updating to gdata-python-client 2.0.10? If so, I'll re-open this issue.
Original comment by tom.h.mi...@gmail.com
on 22 Jun 2010 at 6:06
[deleted comment]
Seems like it does work for me too on gdata 2.0.10 too. :)
Though suddenly discovered that the problem was slightly different- I had tried
<code>set HTTP_PROXY="http://<proxyservername>:<port>"<code> and it didn't
work. Today tried it without the quotes i.e. <code>set
HTTP_PROXY=http://<proxyservername>:<port><code> and it worked. That shouldn't
happen but might be a windows shell thing. My environment was Windows 7.
Original comment by mat...@gmail.com
on 22 Jun 2010 at 7:42
Hi, the problem was the syntax of my http_proxy variable.
Before the installation, this variable was already set to a value in the
"<proxyservername>:<port>" form, which is recognized by wget.
Then I switched to the form "<protocol>://<proxyservername>:<port>", so:
set http_proxy=http://myproxy:8080
set https_proxy=https://myproxy:8080
It worked.
Suggestion:
You could assume that protocol is http, if not specified.
Some people may found this environment variable already set in the implicit
form, and could have no administrative rights to change it in the windows
system properties. (Sure, they can still set these variables into the command
line...)
Original comment by ber...@gmail.com
on 23 Jun 2010 at 9:46
Original issue reported on code.google.com by
jckeert...@gmail.com
on 18 Jun 2010 at 9:53