Skip to content

invoices.get_csv_by_uuid fails with JSONDecodeError #465

Open
@mstyne

Description

@mstyne

Hello DigitalOcean,

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
[<ipython-input-11-e27285619f75>](https://localhost:8080/#) in <cell line: 0>()
     24 print(latest_uuid)
     25 
---> 26 invoice_resp = client.invoices.get_csv_by_uuid(latest_uuid)
     27 invoice_resp

5 frames
[/usr/lib/python3.11/json/decoder.py](https://localhost:8080/#) in raw_decode(self, s, idx)
    353             obj, end = self.scan_once(s, idx)
    354         except StopIteration as err:
--> 355             raise JSONDecodeError("Expecting value", s, err.value) from None
    356         return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I suspect this call fails because the API command returns a string and not JSON.

get_by_uuid for the same invoice UUID has no issues, likely because the response is JSON.

Thanks for your consideration of this issue.

Mike

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions