Closed HumanBot000 closed 1 year ago
The library was breaking due to Craiyon implementing Cloudflare's anti-bot protection page. Bypassed it in the v1.1.0 by using CloudScraper. Please update the wrapper to the latest version by running pip install -U craiyon.py
before using it.
craiyon.py==1.1.0
Same problem
Ignoring exception in on_application_command_error Traceback (most recent call last): File "D:\Programmierung\Python\Projekte\MiniGamesBot\venv\lib\site-packages\nextcord\client.py", line 490, in _run_event await coro(*args, kwargs) File "D:\Programmierung\Python\Projekte\MiniGamesBot\bot\bot.py", line 193, in on_application_command_error raise error File "D:\Programmierung\Python\Projekte\MiniGamesBot\venv\lib\site-packages\nextcord\application_command.py", line 895, in invoke_callback_with_hooks await self(interaction, *args, *kwargs) File "D:\Programmierung\Python\Projekte\MiniGamesBot\venv\lib\site-packages\cooldowns\cooldown.py", line 109, in inner result = await func(args, kwargs) File "D:\Programmierung\Python\Projekte\MiniGamesBot\bot\cogs\Ki stuff.py", line 83, in imagine result = await generator.async_generate(prompt) File "D:\Programmierung\Python\Projekte\MiniGamesBot\venv\lib\site-packages\craiyon\craiyon.py", line 76, in async_generate resp = await resp.json() File "D:\Programmierung\Python\Projekte\MiniGamesBot\venv\lib\site-packages\aiohttp\client_reqrep.py", line 1104, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://api.craiyon.com/v3') ERROR:0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://api.craiyon.com/v3')