Comments (13)
Yes it's runing on a VPS. I will lett you know if this is working.
from telegram-airdrop-bot.
You have to either use systemd
or PM2
to run it clienteles. For more take a look here.
from telegram-airdrop-bot.
Runing the script with pm2 and after some time still stop responding. This is the bot_log from pm2
Traceback (most recent call last):
File "/home/gargamel/airdrop/main.py", line 307, in
bot.polling()
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/init.py", line 514, in polling
self.__threaded_polling(none_stop, interval, timeout, long_polling_timeout)
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/init.py", line 573, in __threaded_polling
raise e
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/init.py", line 536, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/util.py", line 117, in raise_exceptions
raise self.exception_info
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/util.py", line 69, in run
task(*args, **kwargs)
File "/home/gargamel/airdrop/main.py", line 154, in handle_text
bot.send_message(message.chat.id,
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/init.py", line 768, in send_message
apihelper.send_message(self.token, chat_id, text, disable_web_page_preview, reply_to_message_id,
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/apihelper.py", line 225, in send_message
return _make_request(token, method_url, params=payload, method='post')
File "/home/gargamel/.local/lib/python3.8/site-packages/telebot/apihelper.py", line 126, in _make_request
result = _get_req_session().request(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError("(110, 'ETIMEDOUT')"))
from telegram-airdrop-bot.
Do you run the bot on a VPS? Because it looks like a network problem.
You can try the following. Replace bot.polling()
in main.py with:
try:
bot.polling()
except OSError:
print("Connection Error. Reconnecting...")
time.sleep(1)
bot.polling()
from telegram-airdrop-bot.
I just edited the message. You might want to include the print
statement.
from telegram-airdrop-bot.
still same issue. I have two bots running on azure and only this one it's sleeping after a period of time.
from telegram-airdrop-bot.
Odd, never happened to me and I am also not able to reproduce it.
from telegram-airdrop-bot.
I have setup an script and sending /start command to the bot every 5 minutes and it's working now, not going to sleep anymore.
from telegram-airdrop-bot.
What a pita. But if it works.
from telegram-airdrop-bot.
What a pita. But if it works.
on my raspberry pi it's working perfectly but on azure it's going to sleep. Solved this issue for myself by disabling threading
bot = telebot.TeleBot(config.token, threaded=False)
from telegram-airdrop-bot.
Interesting. Are you using the bot behind a Webhook now and it still goes into sleep?
from telegram-airdrop-bot.
Interesting. Are you using the bot behind a Webhook now and it still goes into sleep?
I'm not using it behind a Webhook I have an other bot running behind a webhook.
from telegram-airdrop-bot.
Yea that's the issue with the Webhook setup. Well if threaded=False
did the trick I guess you don't need the Webhook solution.
from telegram-airdrop-bot.
Related Issues (15)
- Database structure is missing HOT 2
- Twitter username HOT 5
- Error: No module named 'eth_utils' HOT 1
- API token no defined HOT 2
- Pleas hlep HOT 2
- Bot no running HOT 2
- Missing handle HOT 1
- ERROR: Failed building wheel for yarl Failed to build cytoolz multidict yarl HOT 3
- A request to the Telegram API was unsuccessful. Error code: 404. Description: Not Found HOT 4
- Near Blockchain Wallet ID's HOT 1
- eth unit HOT 7
- Edit / Change Wallet address HOT 18
- Captcha / verification HOT 1
- Scalability (Polling or Webhook) 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 telegram-airdrop-bot.