bstoilov / py3-pinterest

Fully fledged Python Pinterest client
MIT License
310 stars 107 forks source link

KeyError: 'data' #157

Closed OmarYacop closed 2 years ago

OmarYacop commented 2 years ago

I am trying to comment with the comment() method, when I run my code I get this error:

File "E:\Python Apps\Pins_Commenter\venv\lib\site-packages\py3pin\Pinterest.py", line 526, in load_pin pinJsonData = json.loads(s.contents[0])['resources']['data']['PinResource'] KeyError: 'data'

here is my code: self.pinterest = Pinterest(email='email', username='username', password='password') ............ self.pinterest.login() self.pinterest.comment(pin_id='589901251199423218', text='test test')

it gives me that login was successful and then throws that KeyError

bstoilov commented 2 years ago

I just tested it with my account and it seems to be working. Make sure you are using the latest version of everything