autisticshark / chevereto-telegram-bot Goto Github PK
View Code? Open in Web Editor NEWPython Telegram Bot for Chevereto
Home Page: https://t.me/jpg_dog_bot
License: GNU General Public License v3.0
Python Telegram Bot for Chevereto
Home Page: https://t.me/jpg_dog_bot
License: GNU General Public License v3.0
Hello.
I'm using Ubuntu 22.04 and Python 3.10, while using the bot, it shows the error:
2022-09-22 16:03:32,632 - apscheduler.scheduler - INFO - Scheduler started
image/jpeg
[('source', ('17fb854f-592b-4c80-9ef6-b4bc83fd603f.jpg', <_io.BufferedReader name='17fb854f-592b-4c80-9ef6-b4bc83fd603f.jpg'>, 'image/jpeg'))]
2022-09-22 16:03:36,216 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1076, in _send_output
self.send(chunk)
File "/usr/lib/python3.10/http/client.py", line 998, in send
self.sock.sendall(data)
File "/usr/lib/python3.10/ssl.py", line 1236, in sendall
v = self.send(byte_view[count:])
File "/usr/lib/python3.10/ssl.py", line 1205, in send
return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='EXAMPLE.COM', port=443): Max retries exceeded with url: /api/1/upload/?key=APIKEYHERE&format=json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.10/site-packages/telegram/ext/dispatcher.py", line 557, in process_update
handler.handle_update(update, self, check, context)
File "/home/ubuntu/.local/lib/python3.10/site-packages/telegram/ext/handler.py", line 199, in handle_update
return self.callback(update, context)
File "/home/ubuntu/cheverto-bot/bot.py", line 35, in command_function
function(update, context, *args, **kwargs)
File "/home/ubuntu/cheverto-bot/bot.py", line 96, in image
return_data = image_upload(request_format(image_name))
File "/home/ubuntu/cheverto-bot/bot.py", line 134, in image_upload
upload_response = requests.post(request_url, files = images)
File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/requests/adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='EXAMPLE.COM', port=443): Max retries exceeded with url: /api/1/upload/?key=APIKEYHERE&format=json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))
And the telegram bot will stuck on message Downloading image from Telegram...
Hey i always get this Error
https://gif.vin/images/Ka4.png
https://gif.vin/images/J0C.png
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.