lovelysystems / robotframework-androidlibrary

Robot Framework Automation Library for Android
29 stars 22 forks source link

TypeError: 'instancemethod' object has no attribute '__getitem__' #49

Open tonymontgomery opened 11 years ago

tonymontgomery commented 11 years ago

I wanted to mention something I ran across yesterday that had me stumped until this morning. I was getting the error, "TypeError: 'instancemethod' object has no attribute 'getitem'" on methods that were working perfectly a few weeks ago.

Did a little googling and found the answer:

http://blog.lumino.so/2013/01/04/how-to-make-an-orderly-transition-to-python-requests-1-0-instead-of-running-around-in-a-panic/#comment-652

*quote from above link: 'You see, on December 17, Kenneth Reitz released version 1.0 of requests and declared “This is not a backwards compatible change.” As far as we can tell, this has caused a small ripple of version-related panic in the Python world.'

So, I did as they recommended and fixed by doing the following:

sudo pip install requests-transition

Then changed any imports that read:

import requests

to:

import requests0 as requests

Back to work...

BrewerJack commented 11 years ago

This was exactly what I was looking for. You sir are a saint.