generator = Craiyon() # Instantiates the api wrapper
result = generator.generate("Photorealistic image of shrek eating earth")
print(result.images) # Prints a list of the Direct Image URLs hosted on https://img.craiyon.com
for url in result.images:
print(url)
when i run the code i get this error ;
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
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 "e:\FILES\Documents\Python projects\ELLIOT-BOT\gen 2\advanced_AI.py", line 153, in
result = generator.generate("Photorealistic image of shrek eating earth")
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\craiyon\craiyon.py", line 48, in generate
resp = resp.json()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\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)
i dont know here is the prob here