masperro / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

does not work with python 2.7 and python 3.2 #172

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Traceback (most recent call last):
  File "D:\project\workspace\ibt\src\http.py", line 1, in <module>
    import httplib2
  File "C:\Python27\lib\site-packages\httplib2\__init__.py", line 343
    print('%s:' % h, end=' ', file=self._fp)
                        ^
SyntaxError: invalid syntax

running the example code :
import httplib2

h = httplib2.Http(".cache")
(resp_headers, content) = h.request("http://toefl2.etest.net.cn/cn/SeatsQuery", 
"GET")

Original issue reported on code.google.com by RobinofC...@gmail.com on 4 Sep 2011 at 4:23

GoogleCodeExporter commented 8 years ago
Tried this out on:
Python 2.7.0+ (r27:82500, Sep 15 2010, 18:14:55)
and
Python 3.2.2 (default, Sep 21 2011, 13:11:35)

Both running in virtualenvs

On OS:
Linux hostname 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 
x86_64 GNU/Linux

and could not reproduce the issue :-/

Original comment by bex.le...@gmail.com on 21 Sep 2011 at 12:20

GoogleCodeExporter commented 8 years ago
I experienced the same problem (Windows 7). It turned out that it had installed 
the Python 3 version, so I had to overwrite the files with the correct version.

Original comment by kmar...@gmail.com on 15 Oct 2011 at 9:52

GoogleCodeExporter commented 8 years ago

Original comment by joe.gregorio@gmail.com on 1 Mar 2012 at 3:49