PyImgur icon indicating copy to clipboard operation
PyImgur copied to clipboard

Error when authenticating using PIN

Open gargantuanprism opened this issue 11 years ago • 0 comments

Using Python 2.7.5 on Arch Linux 3.11.6. Commit: fee5db091707ccc85cc56baf53f9f1360cf991be

When authenticating using the PIN method:

Traceback (most recent call last):
  File "./uploader.py", line 84, in <module>
    t = UploadThread()
  File "./uploader.py", line 36, in __init__
    self.__auth()
  File "./uploader.py", line 42, in __auth
    self.__imgur.exchange_pin(pin)
  File "/usr/lib/python2.7/site-packages/pyimgur/__init__.py", line 805, in exchange_pin
    data_field=None)
  File "/usr/lib/python2.7/site-packages/pyimgur/__init__.py", line 704, in _send_request
    result = request.send_request(url, **kwargs)
  File "/usr/lib/python2.7/site-packages/pyimgur/request.py", line 91, in send_request
    content = resp.json()
TypeError: 'dict' object is not callable

Fixed this by changing line 91 of request.py to

content = resp.json

since resp.json is an attribute, not a function. I'll gladly provide a patch but I don't know the proper way to go about it.

gargantuanprism avatar Nov 16 '13 15:11 gargantuanprism