Comments (8)
I have been looking for something similar to aiocfscrape
for such a long time. Thanks for the suggestion!
@FireHead90544 Think we should implement it?
from craiyon.py.
The switch to CloudScraper worked for the standard
generate
function. However, the async functions are still throwingAttempt to decode JSON with unexpected mimetype: text/html; charset=utf-8'
.Recommend using a library like
aiocfscrape
to support CloudScraper's functionality for the async functions.
Oh so that's it, I totally forgot about the async-calls. That's a great idea.
from craiyon.py.
I have been looking for something similar to
aiocfscrape
for such a long time. Thanks for the suggestion!@FireHead90544 Think we should implement it?
Yea, I guess we should go with it.
from craiyon.py.
How to solve this problem if my discord bot returns this error?
from craiyon.py.
How to solve this problem if my discord bot returns this error?
Will be updating the logic for async calls soon using aiocfscrape
or alternative probably
from craiyon.py.
Will be updating the logic for async calls soon using
aiocfscrape
or alternative probably
And when will the fix be released?
from craiyon.py.
Can you make an example for me pls?
from craiyon.py.
Refer to this comment regarding more details: #19 (comment)
TL;DR: Removed the cloudscraper dependency and switched to using headers. v3 works normally, v1 sometimes fails.
Update the wrapper by running: pip install -U craiyon.py
Reopen the issue if this issue still persists
from craiyon.py.
Related Issues (17)
- Why use a class for craiyon.py? HOT 2
- V3 HOT 2
- when will u update to the v3? HOT 5
- aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://api.craiyon.com/draw') HOT 2
- API_TOKEN HOT 2
- How to use upscale feature? HOT 6
- v3 image generation throws a 403 error HOT 9
- Unexpected minetype HOT 2
- urls feature not working HOT 10
- Json Decode Error HOT 8
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) HOT 3
- Error while used for discord bot
- cannot identify image file <_io.BytesIO object HOT 2
- The method Craiyon.generate() should return GeneratedImages(resp.json().get('images')) HOT 2
- AttributeError: 'Craiyon' object has no attribute 'async_generate' HOT 2
- v2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craiyon.py.