3

I am using Python 3, and am not able to --> pip install poster library

I am trying to upload a file using poster. I have tried: pip install poster or easy_install poster they both fail I get an error :

print "send:", repr(value)
                ^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\...

pip install poster  also tried   

easy_install poster .  

I have also tried downloading .tar.gz and I get the same error

I have also tried : pip install --upgrade setuptools
Ghost
  • 549
  • 8
  • 29
  • Possible duplicate of [Python: HTTP Post a large file with streaming](https://stackoverflow.com/questions/2502596/python-http-post-a-large-file-with-streaming) - this appears to have the same behaviour? – Ken Y-N Jan 07 '19 at 00:03

3 Answers3

2

Based on the first line of code, it seems like poster is only Python 2 compatible. Notice that the latest version of this library was published in 2011, so Python 3 compatibility was probably not implemented.

Try using a different library or switching to Python 2.

nareddyt
  • 1,016
  • 10
  • 20
  • Do you know what library I can use to upload a file in pyhton 3? – Ghost Jan 07 '19 at 00:13
  • I'm really not sure, [this post might help](https://stackoverflow.com/questions/40015869/how-to-stream-post-data-into-python-requests). Are the files you are uploading too big to load into memory? If they are not, you can just use the standard `requests` library [like so](https://stackoverflow.com/questions/22567306/python-requests-file-upload). – nareddyt Jan 07 '19 at 02:34
0

Use poster3.

It is the Python3 version of poster.

Srini
  • 1,626
  • 2
  • 15
  • 25
0

For Python3 use poster3. refer this

pip install poster3
Keval
  • 557
  • 10
  • 15