我使用Arch Linux。
我试图执行"pip install“来安装软件包,但无法做到:
❯ pip install python-telegram-bot
Defaulting to user installation because normal site-packages is not writeable
Collecting python-telegram-bot
Using cached python_telegram_bot-13.12-py3-none-any.whl (511 kB)
WARNING: Discarding https://files.pytho
当我试图运行我的脚本(我的电报机器人)时,终端中出现了以下内容:
/usr/local/lib/python3.7/dist-packages/python_telegram_bot-12.4.2-
py3.7.egg/telegram/utils/request.py:47: UserWarning: python-telegram-bot is using upstream urllib3.
This is allowed but not supported by python-telegram-bot maintainers.
我做了什么?
非常感谢
我试图将一个简单的调用和响应机器人部署到Heroku,但我一直收到相同的错误,并且我不知道如何修复它。我发现这个程序可以在我的个人电脑上运行,但是当我把它部署到Heroku上时就不行了。我觉得这与我的import语句有关:
import random
from telegram.ext import Updater
from telegram.ext import CommandHandler
from telegram.ext import MessageHandler
from telegram.ext import Filters
from telegram.ext import mes
我想用python.I创建电报机器人。我从复制了代码,并在代码中添加了代理。因为在我的国家电报是被禁止的。下面是我的代码:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This program is dedicated to the public domain under the CC0 license.
"""
Simple Bot to reply to Telegram messages.
First, a few handler functions are defined. Then, those funct
我可以使用浏览器中的以下url向包含我自己的bot的电报频道发送消息:
https://api.telegram.org/bot*****/sendMessage?chat_id=-********&text=Hello%20World! #there's a - before the chat id value
但是,下面的python代码:
import telebot
API_TOKEN = '*********'
bot = telebot.TeleBot(API_TOKEN)
chat_id='-*******'
try:
我尝试使用安装python-telegram-bot。
当我运行python setup.py install时,我得到的错误信息如下:
creating 'dist/python_telegram_bot-5.2.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_telegram_bot-5.2.0-py2.
有人会犯这样的错误吗?我怎么才能治好他们?
2021-11-07 08:29:38,643 - telegram.ext.updater - ERROR - Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
2021-11-07 08:29:38,644 - telegram.ext.dispatcher - ERROR - No error handlers are registered,
我是电报机器人应用编程接口的新手。我安装了telegrom包?并开始运行我的第一个代码。但是我不能运行我的第一个代码!有人知道为什么会发生这样的事情吗?我该怎么做?谢谢你,?
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more informa
我有一个用python-电报-bot做的项目,在那里我遇到了一些错误。我的开发环境是centos7和python3.6.8
下面的内容是错误所在的代码:
import telegram
from telegram.ext import Updater
from telegram.ext import CommandHandler
from telegram.ext import MessageHandler, Filters
from main import *
with open(r"/home/inseo/바탕화면/weather_report/telegram_key.txt&
我正在使用python- Telegram -bot (python-telegram-bot.org)与来自Python3的Telegram通信
我想要更新我上次发送的回复。目前,下面的代码发送消息,然后在5秒后发送另一条消息。
def echo(bot, update):
update.message.reply_text("Sorry, you're on your own, kiddo.")
time.sleep(5)
update.message.reply_text("Seriously, you're on your