Comments (6)
Yes imaginepy API is down. I am looking for an alternative
from telegrambot-with-gpt.
Fixed
from telegrambot-with-gpt.
If i send picture to bot, i get this error in terminal
Error processing file https://api.telegram.org/file/bot5337896746:AAETEwCAfQPmj_T594ldwp1kxDkA27Xc7ew/photos/file_0.jpg: (1, 'Error opening data file /usr/share/tesseract-ocr/4.00/tessdata/script/Devanagari.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language 'script/Devanagari' Tesseract couldn't load any languages! Could not initialize tesseract.')
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-10' coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py:407> exception=TypeError('Constructor parameter should be str')>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py", line 256, in process_update
return await self.message_handlers.notify(update.message)
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "/home/ubuntu/Telegrambot-with-GPT4free/main.py", line 277, in imageaudio_handler
text = await bm.generate_imagecaption(image_url,HG_TOKEN)
File "/home/ubuntu/Telegrambot-with-GPT4free/bot/botmedia.py", line 25, in generate_imagecaption
async with session.get(url) as resp1, session.post(self.HG_img2text, headers=headers, data=await resp1.read()) as resp2:
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 423, in _request
url = self._build_url(str_or_url)
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 357, in _build_url
url = URL(str_or_url)
File "/usr/local/lib/python3.10/dist-packages/yarl/_url.py", line 179, in new
raise TypeError("Constructor parameter should be str")
TypeError: Constructor parameter should be str
from telegrambot-with-gpt.
Fixed. pronlem from wrong variable name
from telegrambot-with-gpt.
Error again
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-11' coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py:407> exception=TypeError('Constructor parameter should be str')>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/dispatcher.py", line 256, in process_update
return await self.message_handlers.notify(update.message)
File "/usr/local/lib/python3.10/dist-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "/home/ubuntu/Telegrambot-with-GPT4free/main.py", line 255, in imageaudio_handler
text = await bm.generate_imagecaption(image_url,HG_TOKEN)
File "/home/ubuntu/Telegrambot-with-GPT4free/bot/botmedia.py", line 26, in generate_imagecaption
async with session.post(self.HG_img2text, headers=headers, data=await resp1.read()) as resp2:
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 423, in _request
url = self._build_url(str_or_url)
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 357, in _build_url
url = URL(str_or_url)
File "/usr/local/lib/python3.10/dist-packages/yarl/_url.py", line 179, in __new__
raise TypeError("Constructor parameter should be str")
TypeError: Constructor parameter should be str
from telegrambot-with-gpt.
Use with the new code or change your env file hgimg2text to HGIMG2TEXT its already changed in the example file
from telegrambot-with-gpt.
Related Issues (20)
- Stuck on language HOT 2
- My issues about images is still actual HOT 1
- Hi HOT 3
- IndexError: list index out of range HOT 1
- base URLs failed HOT 1
- persona missing in db HOT 3
- Captcha HOT 1
- ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE HOT 1
- Select from the models or providers HOT 1
- bot token error HOT 1
- Not available HOT 2
- https://chimeragpt.adventblocks.cc/api/v1 not working HOT 9
- 404 via dalle generation HOT 4
- how to get key HOT 10
- Many connect errors HOT 1
- Some code is not displayed correctly in telegram HOT 4
- TTS and image is not working HOT 7
- Tts not working
- Commands /changeprovider or /changebot doesn't working HOT 1
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 telegrambot-with-gpt.