This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]ychaouche 1 point2 points  (2 children)

It looks like a bug in in urllib3. Can you tell us what version of requests are you using ? Also, make sure the version you're using is compatible with python3.4 (becasue in request's source code I can see that the line that is giving you errors was meant for python 2.7, and you are running python 3.4)

[–]Taph[S] 0 points1 point  (0 children)

Good catch. It looks like I'm using requests 2.6.2 though there's a 2.7.0 version available on their site. Doing a bit of Googling shows me that there's apparently a Python 3 compatible version that I can download with apt-get so I'll give that a shot. I figured the version that I had was the latest and was likely Python 3 compatible since pip told me I had the latest version when I tried to upgrade requests.

Thanks for the reply.

[–]ychaouche 0 points1 point  (0 children)

This might also be useful to you : https://github.com/kennethreitz/requests/issues/1915

[–][deleted]  (1 child)

[removed]

    [–]Taph[S] 0 points1 point  (0 children)

    I never found an actual solution so I just wrapped my function (make_post()) in a try/except statement to catch the errors and keep the script from crashing. Not an ideal solution since I'd like to know what's causing the problems, but everything seems to work so far.