python-mega
python-mega copied to clipboard
Can't upload a file - req.json()[0], int onbject has no attribute __getitem__
Great job on the wrapper, unfortunatelly I cannot upload a file:

/Users/charlesrenan/anaconda3/envs/ipykernel_py2/lib/python2.7/site-packages/mega/mega.py in api_req(self, data)
42 req = requests.post('https://g.api.mega.co.nz/cs', params=params, data=data)
43 # TODO: error handling
---> 44 return req.json()[0]
45
46 def login_user(self, email, password):
TypeError: 'int' object has no attribute '__getitem__'
@juanriaza How would you do that error handling?