pythontelegrambotgroup | Unsorted

Telegram-канал pythontelegrambotgroup - >>> telegram.Bot()

10206

This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org

Subscribe to a channel

>>> telegram.Bot()

Yes I was using the error handler

Читать полностью…

>>> telegram.Bot()

PTB provides an +error_handler+ that you can use to send message if you want !search

Читать полностью…

>>> telegram.Bot()

huh? then what do I use?

Читать полностью…

>>> telegram.Bot()

Will it run? Won't it run? Who knows

Читать полностью…

>>> telegram.Bot()

One exists, the second one is a joke, sorry! - Use the first one!

Читать полностью…

>>> telegram.Bot()

That's why we have job_queue.run_repeating_perhaps()

Читать полностью…

>>> telegram.Bot()

Jup. Randomly stopping it would be a funny idea

Читать полностью…

>>> telegram.Bot()

Just confirming, job_queue.run_repeating runs it indefinitely?

Читать полностью…

>>> telegram.Bot()

using https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions---JobQueue?

Читать полностью…

>>> telegram.Bot()

https://github.com/python-telegram-bot/python-telegram-bot/network/dependents?dependents

Читать полностью…

>>> telegram.Bot()

Ignore that its here https://github.com/python-telegram-bot/python-telegram-bot/wiki/Bots-built-with-PTB

Читать полностью…

>>> telegram.Bot()

+Bots built with PTB+ !search

Читать полностью…

>>> telegram.Bot()

Hello everyone!

can anyone please help, with this error TypeError: Updater.init() got an unexpected keyword argument 'use_context'
I tried remove (use_context=True) and I got another error TypeError: Updater.init() missing 1 required positional argument: 'update_queue'

Читать полностью…

>>> telegram.Bot()

I think thats comparable to the jupyter notebook issue where the "IDE" already launches a loop.

Читать полностью…

>>> telegram.Bot()

---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1036, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1035 updater_coroutine.close()
-> 1036 raise exc
1037 finally:
1038 # We arrive here either by catching the exceptions above or if the loop gets stopped

File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1025, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1024 try:
-> 1025 loop.run_until_complete(self.initialize())
1026 if self.post_init:

File ~\anaconda3\lib\asyncio\base_events.py:623, in BaseEventLoop.run_until_complete(self, future)
622 self._check_closed()
--> 623 self._check_running()
625 new_task = not futures.isfuture(future)

File ~\anaconda3\lib\asyncio\base_events.py:583, in BaseEventLoop._check_running(self)
582 if self.is_running():
--> 583 raise RuntimeError('This event loop is already running')
584 if events._get_running_loop() is not None:

RuntimeError: This event loop is already running

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1047, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1046 loop.run_until_complete(self.post_stop(self))
-> 1047 loop.run_until_complete(self.shutdown())
1048 if self.post_shutdown:

File ~\anaconda3\lib\asyncio\base_events.py:623, in BaseEventLoop.run_until_complete(self, future)
622 self._check_closed()
--> 623 self._check_running()
625 new_task = not futures.isfuture(future)

File ~\anaconda3\lib\asyncio\base_events.py:583, in BaseEventLoop._check_running(self)
582 if self.is_running():
--> 583 raise RuntimeError('This event loop is already running')
584 if events._get_running_loop() is not None:

RuntimeError: This event loop is already running

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
Input In [18], in <cell line: 733>()
731 application.run_polling(allowed_updates=Update.ALL_TYPES)
733 if name == '__main__':
--> 734 main()

Input In [18], in main()
728 application.add_handler(MessageHandler(filters.TEXT & (~filters.COMMAND), relay_message))
729 application.add_handler(CommandHandler('code', code))
--> 731 application.run_polling(allowed_updates=Update.ALL_TYPES)

File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:836, in Application.run_polling(self, poll_interval, timeout, bootstrap_retries, read_timeout, write_timeout, connect_timeout, pool_timeout, allowed_updates, drop_pending_updates, close_loop, stop_signals)
833 def error_callback(exc: TelegramError) -> None:
834 self.create_task(self.process_error(error=exc, update=None))
--> 836 return self.__run(
837 updater_coroutine=self.updater.start_polling(
838 poll_interval=poll_interval,
839 timeout=timeout,
840 bootstrap_retries=bootstrap_retries,
841 read_timeout=read_timeout,
842 write_timeout=write_timeout,
843 connect_timeout=connect_timeout,
844 pool_timeout=pool_timeout,
845 allowed_updates=allowed_updates,
846 drop_pending_updates=drop_pending_updates,
847 error_callback=error_callback, # if there is an error in fetching updates
848 ),
849 close_loop=close_loop,
850 stop_signals=stop_signals,
851 )

File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1052, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1050 finally:
1051 if close_loop:
-> 1052 loop.close()

File

Читать полностью…

>>> telegram.Bot()

errorhandlerbot.py

Читать полностью…

>>> telegram.Bot()

Examples directory of python-telegram-bot:
errorhandlerbot.py

Читать полностью…

>>> telegram.Bot()

Uhm. You don't need to use tasks or job queues for that though

Читать полностью…

>>> telegram.Bot()

English only here, and these groups are not for job offers, use different ones or websites

Читать полностью…

>>> telegram.Bot()

what's the difference between these 2?

Читать полностью…

>>> telegram.Bot()

Thanks, I needed the ptb error handling to send me a DM on errors, which was tricky with running an asyncio.create_task

Читать полностью…

>>> telegram.Bot()

The callbacks you pass must be function names, not None :)

Читать полностью…

>>> telegram.Bot()

hello everyone. i would like to make a bot for the store on my own. and im looking for a tutor who would teach me, and with his help i would do it. i will be glad to receive feedback from russia or belarus, because i will be able to pay. thanks to the community!

всем привет. хотелось бы самостоятельно сделать бот для магазина. и я ищу репетитора, который бы научил меня, и с его помощью бы его сделала. буду рада отзывам из россии или белоруссии, потому что смогу платить. спасибо сообществу!

Читать полностью…

>>> telegram.Bot()

Nothing extra needed

Читать полностью…

>>> telegram.Bot()

How to install python telegram bot for concurrent updates

Читать полностью…

>>> telegram.Bot()

Wiki Category Code Snippets: Build a menu with Buttons

Читать полностью…

>>> telegram.Bot()

Anyone has Python telegram bot (new version) open source code?

Читать полностью…

>>> telegram.Bot()

No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.12/site-packages/telegram/ext/_application.py", line 1264, in process_update
await coroutine
File "/app/.heroku/python/lib/python3.12/site-packages/telegram/ext/_handlers/basehandler.py", line 157, in handle_update
return await self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

Читать полностью…

>>> telegram.Bot()

Hey. Please show the full traceback via a pastebin. Make sure to include everything from the first Traceback (most recent call last): until the last error message. https://pastebin.com/ is a popular pastebin service, but there are many alternatives out there.

Читать полностью…

>>> telegram.Bot()

Remove and readd the bot if you change privacy setting while it is in the group

Читать полностью…
Subscribe to a channel