Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support? #19

Open
djshuckerow opened this issue Nov 5, 2014 · 12 comments
Open

Python3 support? #19

djshuckerow opened this issue Nov 5, 2014 · 12 comments

Comments

@djshuckerow
Copy link

In Python3.4, I run
$ pip install unirest
I get the following error:
Downloading/unpacking unirest
Downloading Unirest-1.1.6.tar.gz
Running setup.py (path:C:\Users\David\AppData\Local\Temp\pip_build_David\unirest\setup.py) egg_info for package unirest

warning: no files found matching '*.txt' under directory 'docs'

Downloading/unpacking poster>=0.8.1 (from unirest)
Downloading poster-0.8.1.tar.gz
Running setup.py (path:C:\Users\David\AppData\Local\Temp\pip_build_David\poster\setup.py) egg_info for package poster
Traceback (most recent call last):
File "", line 17, in
File "C:\Users\David\AppData\Local\Temp\pip_build_David\poster\setup.py", line 2, in
import poster
File "C:\Users\David\AppData\Local\Temp\pip_build_David\poster\poster__init__.py", line 29, in
import poster.streaminghttp
File "C:\Users\David\AppData\Local\Temp\pip_build_David\poster\poster\streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 17, in

File "C:\Users\David\AppData\Local\Temp\pip_build_David\poster\setup.py", line 2, in

import poster

File "C:\Users\David\AppData\Local\Temp\pip_build_David\poster\poster__init__.py", line 29, in

import poster.streaminghttp

File "C:\Users\David\AppData\Local\Temp\pip_build_David\poster\poster\streaminghttp.py", line 61

print "send:", repr(value)

            ^

SyntaxError: invalid syntax

PS: I'm running Windows 8.1, although this looks like a problem in python2 vs python3 syntax.

@tgunn
Copy link

tgunn commented Nov 13, 2014

I am also experiencing this issue

@alexandrevicenzi
Copy link

Yes. It's a problem with poster package. It's only works with Python 2.

A good way to solve this is to remove poster dependency or send a PR to poster project.

See this issue.

@ygbr
Copy link

ygbr commented Feb 27, 2015

+1

2 similar comments
@simudream
Copy link

+1

@ipeisong
Copy link

+1

@mrd1no
Copy link

mrd1no commented Aug 14, 2015

Hi all, I managed to create a working version of poster:
https://github.com/mrd1no/poster-0.8.1-for-Python-3.4

I can also install correctly unirest (I still have some minor issues with StringIO for this library:
builtins.TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str)

@Shokr
Copy link

Shokr commented Dec 17, 2015

+1

@mikeyhew
Copy link

Still not working as of today:

$ pip3 install unirest
Collecting unirest
  Downloading Unirest-1.1.7.tar.gz
Collecting poster>=0.8.1 (from unirest)
  Downloading poster-0.8.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/lk/kgsvgr293l94fhdbnvk1mjx00000gn/T/pip-build-f9rc1vhp/poster/setup.py", line 2, in <module>
        import poster
      File "/private/var/folders/lk/kgsvgr293l94fhdbnvk1mjx00000gn/T/pip-build-f9rc1vhp/poster/poster/__init__.py", line 29, in <module>
        import poster.streaminghttp
      File "/private/var/folders/lk/kgsvgr293l94fhdbnvk1mjx00000gn/T/pip-build-f9rc1vhp/poster/poster/streaminghttp.py", line 61
        print "send:", repr(value)
                    ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1

@alexandrevicenzi
Copy link

@mikeyhew there's always requests to replace unirest

@mikeyhew
Copy link

mikeyhew commented Nov 1, 2016

@alexandrevicenzi true. That's what I ended up using today.

@tirkarthi
Copy link

tirkarthi commented Mar 26, 2018

Sorry to bump this. In case anyone needs it I have made a fork compatible with Python 3 at https://github.com/tirkarthi/unirest-python . You can use it as a git based dependency. It doesn't work for gzip based files for now.

There is an incompatible dependency poster. You can find a Python 3 fork of the same at https://github.com/tirkarthi/python-poster.

@QGB
Copy link

QGB commented May 6, 2021

Unirest vs requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests