koalalorenzo/python-digitalocean

JSON Read Error on droplet.create()

Closed this issue · 1 comments

When trying to create a droplet, I get an error back:

Traceback (most recent call last):
File "./test.py", line 10, in
droplet.create();
File "/nix/store/939xd7jsl5vips32icrhq5m2bljasjqf-python3-3.5.3-env/lib/python3.5/site-packages/digitalocean/Droplet.py", line 564, in create
data = self.get_data("droplets/", type=POST, params=data)
File "/nix/store/939xd7jsl5vips32icrhq5m2bljasjqf-python3-3.5.3-env/lib/python3.5/site-packages/digitalocean/Droplet.py", line 162, in get_data
data = super(Droplet, self).get_data(*args, **kwargs)
File "/nix/store/939xd7jsl5vips32icrhq5m2bljasjqf-python3-3.5.3-env/lib/python3.5/site-packages/digitalocean/baseapi.py", line 167, in get_data
'Read failed from DigitalOcean: %s' % str(e)
digitalocean.baseapi.JSONReadError: Read failed from DigitalOcean: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

This turned out to be an issue with my API token. Generated a new one, and it worked fine.