- 修改青龙 _id 字段为 id
- 更新telethon依赖版本
能不能支持一下v2ray
求指导~~
2021-12-02 10:10:38,539-jbot-INFO=> [load_module] Bot加载失败-->bean.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:38,549-jbot-INFO=> [load_module] Bot加载失败-->reboot.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:43,593-jbot-INFO=> [load_module] Bot加载失败-->bean.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:43,596-jbot-INFO=> [load_module] Bot加载失败-->reboot.py-->The _imaging extension was built for another version of Pillow or PIL:
Core version: 8.1.2
2021-12-02 10:10:48,621-jbot-INFO=> [load_module] Bot加载失败-->usermsg.py-->database is locked
2021-12-02 10:10:53,635-jbot-INFO=> [load_module] Bot加载失败-->login.py-->database is locked
2021-12-02 10:10:58,646-jbot-INFO=> [load_module] Bot加载失败-->start.py-->database is locked
内网运行的一台虚拟机,通过frp内网穿透访问docke,机器人查询 bean 和 chart时会报错! 报错如下:
something wrong,I'm sorry HTTPSConnectionPool(host='127.0.0.1', port=443): Max retries exceeded with url: /?cdn=nohost (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1e4e2a9160>: Failed to establish a new connection: [Errno 111] Connection refused'))
建议在tg扫码获取cookies的时候,添加是否替换config.sh里面cookie的选项
由于pt_pin是固定的,可以根据pt_pin定位到对应的旧cookie.
感谢🙏!
目前我shortcut.list存了一些有用的命令,但是偶尔我会设置一些新命令
但是如果用setshort的话会覆盖原来的命令。能新增一个命令来专门 新增shortcut吗
调用myck后运行日志提示:[qlenv] search-->JD_COOKIE-->eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiakRCbGZLeGNnQS1LbXhiMG5BcFB4WTcjN2xVYk9kRjBOSiNLN3VxcW1NU2Rad0NZemUyTDFqeW0wRk8iLCJpYXQiOjE2MjU1NTM3ODAsImV4cCI6MTYyNTgxMjk4MH0.n1BzJx3folZ90h0mB272ZnjQm19Z79WIAPYySZYJIsn6XHDaYH7ciXGoT0_LqoIx
查看run.log,发现在启动时有错误提示:
2022-03-05 19:45:42,416-jbot-INFO=> [load_module] Bot加载失败-->login.py-->database is locked
同时交互出错是比如输入/cron 测试,选择其中一个结果,点运行,即会出现如标题所述提示。
烦请赐教如何解决?
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 1, in
from telethon import TelegramClient, connection
File "/usr/lib/python3.9/site-packages/telethon/init.py", line 1, in
from .client.telegramclient import TelegramClient
File "/usr/lib/python3.9/site-packages/telethon/client/init.py", line 21, in
from .downloads import DownloadMethods
File "/usr/lib/python3.9/site-packages/telethon/client/downloads.py", line 16, in
import aiohttp
File "/usr/lib/python3.9/site-packages/aiohttp/init.py", line 6, in
from .client import (
File "/usr/lib/python3.9/site-packages/aiohttp/client.py", line 36, in
from . import hdrs, http, payload
File "/usr/lib/python3.9/site-packages/aiohttp/http.py", line 7, in
from .http_parser import (
File "/usr/lib/python3.9/site-packages/aiohttp/http_parser.py", line 29, in
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/lib/python3.9/site-packages/aiohttp/helpers.py", line 732, in
def ceil_timeout(delay: Optional[float]) -> async_timeout.Timeout:
AttributeError: module 'async_timeout' has no attribute 'Timeout'
已挂t 别的容器却是正常
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 1, in
from telethon import TelegramClient, connection
File "/usr/lib/python3.8/site-packages/telethon/init.py", line 1, in
from .client.telegramclient import TelegramClient
File "/usr/lib/python3.8/site-packages/telethon/client/init.py", line 23, in
from .auth import AuthMethods
ModuleNotFoundError: No module named 'telethon.client.auth'
root@57be82dd7f0e:/ql $ python3 -m jbot
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/ql/jbot/__init__.py", line 67, in <module>
jdbot = TelegramClient('bot', API_ID, API_HASH, connection=connectionType,
File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 140, in _start
await self.connect()
File "/usr/lib/python3.8/site-packages/telethon/client/telegrambaseclient.py", line 513, in connect
if not await self._sender.connect(self._connection(
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 127, in connect
await self._connect()
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 227, in _connect
connected = await self._try_connect(attempt)
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 277, in _try_connect
await self._connection.connect(timeout=self._connect_timeout)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 244, in connect
await self._connect(timeout=timeout, ssl=ssl)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 106, in _connect
await super()._connect(timeout=timeout, ssl=ssl)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 237, in _connect
self._init_conn()
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 386, in _init_conn
self._obfuscation = self.obfuscated_io(self)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 28, in __init__
self._decrypt) = self.init_header(
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 42, in init_header
raise ValueError(
ValueError: MTProxy secret must be a hex-string representing 16 bytes
'ee5277cce9da9749bf9a5746e6090a46207777772e6d6963726f736f66742e636f6d'
telethon.network.mtprotosender-WARNING=> [_try_connect] Attempt 344 at connecting failed: ConnectionRefusedError: [Errno 111] Connect call failed ('149.154.167.51', 443)
bot.log为空
看了https://my.telegram.org/apps里服务器地址是 149.154.167.40:443
如何修改服务器地址?
something wrong,I'm sorry
'latin-1' codec can't encode characters in position 201-206: ordinal not in range(256)
比如修改cron时会返回 something wrong,I'm sorry'_id'
希望作者可以适配一下新版的情况哈,感谢 :)
utils.py的486行是不是写错了?
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 67, in
jdbot = TelegramClient('bot', api_id, api_hash, connection=connectionType,
File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3.8/site-packages/telethon/client/auth.py", line 140, in _start
await self.connect()
File "/usr/lib/python3.8/site-packages/telethon/client/telegrambaseclient.py", line 513, in connect
if not await self._sender.connect(self._connection(
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 127, in connect
await self._connect()
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 227, in _connect
connected = await self._try_connect(attempt)
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 277, in _try_connect
await self._connection.connect(timeout=self._connect_timeout)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 244, in connect
await self._connect(timeout=timeout, ssl=ssl)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 106, in _connect
await super()._connect(timeout=timeout, ssl=ssl)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 237, in _connect
self._init_conn()
File "/usr/lib/python3.8/site-packages/telethon/network/connection/connection.py", line 386, in _init_conn
self._obfuscation = self.obfuscated_io(self)
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 28, in init
self._decrypt) = self.init_header(
File "/usr/lib/python3.8/site-packages/telethon/network/connection/tcpmtproxy.py", line 42, in init_header
raise ValueError(
ValueError: MTProxy secret must be a hex-string representing 16 bytes
一直都是这个错误,请问怎么解决
是因为彻底失效了还是因为有安全隐患呢
例如 /bean 不带参数,就显示所有账号的京豆。
新注册的bot机器只要运行就提示没有userID,已经对接过的ID可以对接成功,请问是哪里的问题呢?
2021-08-12 15:59:52,679-asyncio-ERROR=> [default_exception_handler] Task exception was never retrieved
future: <Task finished name='Task-10' coro=<hello() done, defined at /jd/jbot/main.py:64> exception=ValueError('Could not find the input entity for PeerUser(user_id=1934278299) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.')>
Traceback (most recent call last):
File "/jd/jbot/main.py", line 69, in hello
await jdbot.send_message(chat_id, f'{str(word)}\n\n\t{info}', link_preview=False)
File "/usr/lib/python3.8/site-packages/telethon/client/messages.py", line 767, in send_message
entity = await self.get_input_entity(entity)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 461, in get_input_entity
raise ValueError(
ValueError: Could not find the input entity for PeerUser(user_id=1934278299) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.
api_id和api_hash从网站上复制下来的,这个应该是没问题的,但是启动报了这个错。
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/ql/jbot/init.py", line 72, in
jdbot = TelegramClient('bot', API_ID, API_HASH,
File "/usr/lib/python3.9/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/lib/python3.9/site-packages/telethon/client/auth.py", line 182, in _start
await self.sign_in(bot_token=bot_token)
File "/usr/lib/python3.9/site-packages/telethon/client/auth.py", line 368, in sign_in
result = await self(request)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 79, in _call
result = await future
telethon.errors.rpcerrorlist.ApiIdInvalidError: The api_id/api_hash combination is invalid (caused by ImportBotAuthorizationRequest)
如果大佬知道的话,麻烦告知一下解决方案,谢谢。
麻烦请教下,python3 -m jbot报错 No module named jbot
有没有办法弄到企业微信的机器人呢
在机器上是可以正常执行的,但使用机器人执行就没有效果
telethon.errors.rpcerrorlist.AuthKeyDuplicatedError: The authorization key (session file) was used under two different IP addresses simultaneously, and can no longer be used. Use the same session exclusively, or use different sessions (caused by InvokeWithLayerRequest)
说session被两个ip用了,我网上查了下说删掉session文件就可以了,不过我找了好久都没找到在哪里,我用的是v4 bot版
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
显示这个
返回信息 发生了某些错误 21
ql bot 就可以把bot开启了,但是有关闭命令吗?
这两命令不返回信息啊
oot@qinglong:/ql $ python3 -m jbot
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/ql/jbot/main.py", line 9, in
from .bot.update import version, botlog
File "/ql/jbot/bot.py", line 10, in
from .. import chat_id, jdbot, _ConfigDir, _ScriptsDir, _OwnDir, _LogDir, logger, TOKEN
ValueError: attempted relative import beyond top-level package
能否使用json5解析bot中的 json 形式的配置文件?
需要项目引入json5的依赖。
参见:
https://pypi.org/project/json5/
https://wxnacy.com/2018/02/18/json5/
电报执行 此命令 /chart 1
命令提示:
something wrong,I'm sorry
list index out of range
大佬这种情况应该怎么处理?在青龙里安装的
2022-02-27 23:15:12,260-telethon.network.mtprotosender-ERROR=> [send] Request caused struct.error: 'I' format requires 0 <= number <= 4294967295: GetUsersRequest(id=[InputUser(user_id=5299254924, access_hash=0)])
2022-02-27 23:15:12,261-asyncio-ERROR=> [default_exception_handler] Task exception was never retrieved
future: <Task finished name='Task-9' coro=<new_ver() done, defined at /jd/jbot/main.py:21> exception=error("'I' format requires 0 <= number <= 4294967295")>
Traceback (most recent call last):
File "/jd/jbot/main.py", line 37, in new_ver
await jdbot.send_message(chat_id, f'机器人上新了\n{botlog}\n运行日志为log/bot/run.log\n\n\t{info}', link_preview=False)
File "/usr/lib/python3.8/site-packages/telethon/client/messages.py", line 767, in send_message
entity = await self.get_input_entity(entity)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 440, in get_input_entity
users = await self(functions.users.GetUsersRequest([
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 58, in _call
future = sender.send(request, ordered=ordered)
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 176, in send
state = RequestState(request)
File "/usr/lib/python3.8/site-packages/telethon/network/requeststate.py", line 17, in init
self.data = bytes(request)
File "/usr/lib/python3.8/site-packages/telethon/tl/tlobject.py", line 194, in bytes
return self._bytes()
File "/usr/lib/python3.8/site-packages/telethon/tl/functions/users.py", line 72, in _bytes
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/lib/python3.8/site-packages/telethon/tl/functions/users.py", line 72, in
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/lib/python3.8/site-packages/telethon/tl/types/init.py", line 11564, in _bytes
struct.pack('<I', self.user_id),
struct.error: 'I' format requires 0 <= number <= 4294967295
执行过nohup python3 -m jbot >/ql/log/bot/bot.log 2>&1 &
ck-->env CK
店铺签到-->cmd task aa.js
这样配置后点击按钮没有效果呀
安装过程中出现这个提示:WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
大佬,该怎么做?
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.