robotframework-androidlibrary icon indicating copy to clipboard operation
robotframework-androidlibrary copied to clipboard

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

Open tonymontgomery opened this issue 13 years ago • 1 comments

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...

tonymontgomery avatar Jan 24 '13 13:01 tonymontgomery

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

BrewerJack avatar Jun 01 '13 02:06 BrewerJack