Open edwgjj opened 1 year ago
same issue
Any fix for this ?
I was use wrong api key and receive thesame erro, Solution: Use correct api key
I was use wrong api key and receive thesame erro, Solution: Use correct api key
how did you obtain your api key? I have a basic paid account on midjourney
This video explain how to create a account in the next leg https://www.youtube.com/watch?v=93z375Ffs2U&t=1s
Dear How to set up the api key ?
Thanks for writing this cool API. Sadly I am having an issue with it. When running this code:
from midjourney_api import TNL
tnl = TNL('myapikey')
response = tnl.imagine("a monkey")
print(response)
I get the following error message `Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/ak/Library/Application Support/CodeRunner/Unsaved/Untitled.py", line 7, in
tnl.get_settings()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/midjourney_api/init.py", line 135, in get_settings
return res.json()
^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)`
Any help would be appreciated to getting this to work! Thanks!