Open GoogleCodeExporter opened 9 years ago
[deleted comment]
I set the following env vars:
http_proxy=http://..
https_proxy=http://..
proxy_username=...
proxy_password=...
...and this has some effect - I no longer get a timeout or "Proxy
Authentication Required" message, so I believe the values to be correct.
However, I still get the following error:
Traceback (most recent call last):
File "src/google", line 463, in <module>
main()
File "src/google", line 457, in main
run_once(options, args)
File "src/google", line 330, in run_once
token_valid = client.IsTokenValid()
File "/home/seed/Downloads/googlecl-0.9.7/src/googlecl/calendar/service.py", line 265, in is_token_valid
return googlecl.service.BaseServiceCL.IsTokenValid(self, test_uri)
File "/home/seed/Downloads/googlecl-0.9.7/src/googlecl/service.py", line 170, in is_token_valid
self.Get(test_uri)
File "/usr/lib/python2.6/site-packages/gdata/service.py", line 1092, in Get
encoding=encoding, converter=converter)
File "/usr/lib/python2.6/site-packages/gdata/service.py", line 1103, in Get
'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 401, 'body':
'<HTML>\n<HEAD>\n<TITLE>Unknown authorization header</TITLE>\n</HEAD>\n<BODY
BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Unknown authorization
header</H1>\n<H2>Error 401</H2>\n</BODY>\n</HTML>\n', 'reason': 'Unknown
authorization header'}
Original comment by paulse...@gmail.com
on 22 Jun 2010 at 7:35
Interesting idea, and this worked for me:
export http_proxy= ; google COMMAND
the "MYPASSWORD@IP-OF-PROXY" is a part of
http_proxy=http://MYUSER:MYPASSWORD@IP-OF-PROXY:PROXYPORT/ variable (yes the
proxy pass is same like my google acc pass, i changed it ...)
But this seems that the googlecl has problems with this env variable??
Original comment by nagy.ger...@gmail.com
on 25 Jun 2010 at 7:26
I took a peek at the code that handles this, and it's a limitation of the atom
library. When parsing the proxy url, it does a (pretty unintelligent) split on
':' in 'MYUSER:MYPASSWORD@IP-OF-PROXY:PROXYPORT' and takes the first element as
the url and the second as the port.
So, the atom library (and therefore gdata and therefore googlecl) won't accept
anything for http_proxy except 'http://url:port'. There's more info in the FAQ
under Troubleshooting.
paulseed1, are those typos for your proxy settings? http_proxy=http://. sounds
like it will definitely fail, as "." isn't much of a url. Regardless, could you
try running the failing command with googlecl 0.9.9 and using the --debug flag?
Original comment by tom.h.mi...@gmail.com
on 30 Jul 2010 at 5:54
Issue 324 has been merged into this issue.
Original comment by tom.h.mi...@gmail.com
on 4 Nov 2010 at 10:00
I found a related issue in the gdata bug tracker here:
http://code.google.com/p/gdata-python-client/issues/detail?id=414
Please star that issue to show you want the problem resolved. I'll still look
at getting some kind of workaround into GoogleCL, but the best method to
resolve this problem is to get a patch accepted into the gdata python client.
Original comment by tom.h.mi...@gmail.com
on 4 Nov 2010 at 10:03
So I decided to tackle the issue myself, and poking around the source code, I
found something that might work.
Set the environment variables proxy_username and proxy_password, and take that
info out of http_proxy and https_proxy. That is, go from this:
http_proxy=http://user:password@host:port
to
http_proxy=http://host:port
proxy_username=user
proxy_password=password
Original comment by tom.h.mi...@gmail.com
on 4 Nov 2010 at 11:06
Original issue reported on code.google.com by
nagy.ger...@gmail.com
on 21 Jun 2010 at 6:59