Comment 2 for bug 1929643

Revision history for this message
Lee Trager (ltrager) wrote :

Run the attached script as follows:

./maas -k $USER_API_KEY http://$REGION_IP:5240/MAAS/api/2.0/machines/

Most of the time you'll get

ERROR: status code - 500

expected string or bytes-like object

On line 22 uncomment 'headers["Accept"] = "application/json"' and now the call works.