amiyabot / amiya-bot Goto Github PK
View Code? Open in Web Editor NEW《明日方舟》BOT
Home Page: https://www.amiyabot.com
License: MIT License
《明日方舟》BOT
Home Page: https://www.amiyabot.com
License: MIT License
比如年啊梅啊等等
现在很多功能需要也只能“两步走”,也就是先唤出列表再回复序号
建议是可以选择直接带上序号来一次查询
比如我要查莫斯提马的某档案,我可以直接用
阿米娅莫斯提马档案[列表中的序号]
而不是
阿米娅莫斯提马档案
[列表中的序号]
在相对大量的数据查询时,这会更加方便,也更节省资源
尝试手动从 https://github.com/yuanyan3060/Arknights-Bot-Resource 此处下载资源文件替换(似乎文件夹名字有点不一样,自己手动改了下),依旧不是最新版
找了半天 没找到其他资源的下载地址,请问如何手动使资源更新到最新?
求助大佬
PS C:\Files\lzy的bot\amiya\Amiya-Bot> python amiya.py
loading tags data...
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\ADMINI~1\AppData\Local\Temp\2\jieba.cache
Loading model cost 1.474 seconds.
Prefix dict has been built successfully.
loading operators data...
loading materials data...
Traceback (most recent call last):
File "C:\Files\lzy的bot\amiya\Amiya-Bot\amiya.py", line 4, in
from modules.network.websocketClient import Websocket
File "C:\Files\lzy的bot\amiya\Amiya-Bot\modules\network\websocketClient.py", line 7, in
from message.messageHandler import MessageHandler
File "C:\Files\lzy的bot\amiya\Amiya-Bot\message\messageHandler.py", line 7, in
from message.replies import reply_func_list
File "C:\Files\lzy的bot\amiya\Amiya-Bot\message\replies_init_.py", line 5, in
from .emotion import emotion
File "C:\Files\lzy的bot\amiya\Amiya-Bot\message\replies\emotion.py", line 8, in
amiya_name = database.config.get_amiya_name()
File "C:\Files\lzy的bot\amiya\Amiya-Bot\database\controller\configController.py", line 16, in get_amiya_name
self.get_config('amiya_name', 'good_name', True)['config_values'].split(','),
TypeError: 'NoneType' object is not subscriptable
如图,Amiya-Bot-dev目录是从主仓库V5-master分支clone下来的,chromium已安装,版本信息如图,依赖已安装。
很离谱,今天上午在写新功能的时候一点事没有,然后等我尝试新建一个dev的git分支后,运行就出现了这个问题。然后我想看下主repo有没有这个问题,结果整下来,嘿,还是报错。
原因尚不清楚,在查询之后我认为是asyncio.run会自动关闭loop,当我尝试直接使用loop的run_until_complete时,更离谱了,Pycharm的exit code是1,也就是说虽然没有报错,但是程序异常终止了,btw?
附上报错信息:
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000027122CB6AF0>
Traceback (most recent call last):
File "C:\Users\FogFo.conda\envs\amiya-run\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Users\FogFo.conda\envs\amiya-run\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Users\FogFo.conda\envs\amiya-run\lib\asyncio\base_events.py", line 719, in call_soon
self._check_closed()
File "C:\Users\FogFo.conda\envs\amiya-run\lib\asyncio\base_events.py", line 508, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
这有助于分析筛选恶意用户并将其拉黑
简单记录:指记下谁用了,用了什么,什么时候用的,(指定时间段内)用了几次
能直接筛出恶意用户就最好了,把数据显著高于平均值的置顶显示什么的
毕竟OCR是付费的,免费额度多的一批的兔妈感受不到我们的痛
我自己找了一个公招分析的数据接口
但是,我不会写qaq
(菜鸡爬了)
这里希望Amy能实现这个功能
https://www.bigfun.cn/static/aktools/【最新版本】/data/akhr.json
其中的最新版本要从bigfun明日方舟工具箱获取
我使用正则来获取
<script src="/static/aktools/(\d+)/js/runtime-es2015.js" type="module">
因为一般玩家对公招三星的结果不感兴趣
或许功能应该返回必出四星的tags组合?
在2020/12/12晚7点时
最新版本为1604978022
运行 python amiya.py
时报错,
Traceback (most recent call last):
File "amiya.py", line 6, in <module>
from message.messageHandler import MessageHandler
File "H:\Amiya-Bot\message\messageHandler.py", line 7, in <module>
from message.replies import reply_func_list
File "H:\Amiya-Bot\message\replies\__init__.py", line 5, in <module>
from .emotion import emotion
File "H:\Amiya-Bot\message\replies\emotion.py", line 8, in <module>
amiya_name = database.config.get_amiya_name()
File "H:\Amiya-Bot\database\controller\configController.py", line 16, in get_amiya_name
self.get_config('amiya_name', 'good_name', True)['config_values'].split(','),
TypeError: 'NoneType' object is not subscriptable
root@localhost:~/Amiya-Bot# python3 amiya.py
[2022-01-09 00:31:40][INFO] Starting AmiyaBot...
[2022-01-09 00:31:40][INFO] Init http session: TA5hE872
[2022-01-09 00:31:40][INFO] Release session: TckLvaHM
[2022-01-09 00:31:40][INFO] Checking GameData update...
[2022-01-09 00:31:40][INFO] GameData version is up to date: 24.2.0
[2022-01-09 00:31:40][INFO] [=========================] 100% 15/15 (15 TT, 15 OK, 0 NG) <gameData>
[2022-01-09 00:31:40][INFO] Checking Console update...
[2022-01-09 00:31:41][INFO] Console version is up to date: 1637233491718
[2022-01-09 00:31:41][INFO] [=========================] 100% 16/16 (16 TT, 16 OK, 0 NG) <console>
[2022-01-09 00:31:41][INFO] [=========================] 100% 16/16 (16 TT, 16 OK, 0 NG) <face>
[2022-01-09 00:31:41][INFO] [=========================] 100% 3/3 (3 TT, 3 OK, 0 NG) <style>
[2022-01-09 00:31:41][INFO] [=========================] 100% 8/8 (8 TT, 8 OK, 0 NG) <class>
[2022-01-09 00:31:41][INFO] [=========================] 100% 7/7 (7 TT, 7 OK, 0 NG) <gacha>
[2022-01-09 00:31:41][INFO] [=========================] 100% 2/2 (2 TT, 2 OK, 0 NG) <database>
[2022-01-09 00:31:41][INFO] [=========================] 100% 70/70 (13 TT, 13 OK, 0 NG) <AmiyaVoices>
[2022-01-09 00:31:42][INFO] [ ] 0% 0/225 (0 TT, 0 OK, 0 NG) <operators>Traceback (most recent call last):
File "/root/Amiya-Bot/amiya.py", line 42, in <module>
amiya = Main()
File "/root/Amiya-Bot/amiya.py", line 19, in __init__ self.handlers = Handlers(self)
File "/root/Amiya-Bot/handlers/handleMessage.py", line 19, in __init__
super().__init__(bot)
File "/root/Amiya-Bot/handlers/functions/__init__.py", line 23, in __init__
self.arknights = Arknights(bot)
File "/root/Amiya-Bot/handlers/functions/arknights/__init__.py", line 12, in __init__
super().__init__(auto_update=True, check_assets=True)
File "/root/Amiya-Bot/dataSource/__init__.py", line 31, in __init__
self.download_operators_images(self.operators)
File "/root/Amiya-Bot/dataSource/__init__.py", line 183, in download_operators_images
res = self.get_pic(f'portrait/{item.id}_1', 'portraits')
File "/root/Amiya-Bot/dataSource/sourceBank.py", line 66, in get_pic
escape_name = name.repalce("#", "%23")
AttributeError: 'str' object has no attribute 'repalce'
OS:Windows 10
Python version:Python 3.8.2
MySQL version:mysql-8.0.23-winx64
使用Mirai 2.4.0-MCL 1.0.5
config.json已配置与本机相符
数据全部导入到amiya库中,使用查询命令后有返回结果
select * from t_config_amiya where config_name = "amiya_name" AND config_keyword = "good_name"
在第四步报错
>python amiya.py
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\ADMINI~1\AppData\Local\Temp\jieba.cache
Loading model cost 1.344 seconds.
Prefix dict has been built successfully.
Traceback (most recent call last):
File "amiya.py", line 8, in <module>
from message.messageHandler import MessageHandler
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\message\messageHandler.py", line 21, in <module>
function = FunctionsIndex()
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\functions\functionsIndex.py", line 31, in __init__
module = importlib.import_module(module_path, package='functions')
File "D:\Python18\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\functions\userInfo\init.py", line 8, in <module>
database = BaseController()
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\database\baseController.py", line 21, in __init__
self.comb = Mysql(base_config)
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\database\sqlCombiner.py", line 7, in __init__
self.db = pymysql.connect(
File "D:\Python18\lib\site-packages\pymysql\__init__.py", line 94, in Connect
return Connection(*args, **kwargs)
File "D:\Python18\lib\site-packages\pymysql\connections.py", line 327, in __init__
self.connect()
File "D:\Python18\lib\site-packages\pymysql\connections.py", line 587, in connect
self._get_server_information()
File "D:\Python18\lib\site-packages\pymysql\connections.py", line 969, in _get_server_information
packet = self._read_packet()
File "D:\Python18\lib\site-packages\pymysql\connections.py", line 676, in _read_packet
packet.raise_for_error()
File "D:\Python18\lib\site-packages\pymysql\protocol.py", line 223, in raise_for_error
err.raise_mysql_exception(self._data)
File "D:\Python18\lib\site-packages\pymysql\err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1040, 'ny connections')
Exception ignored in: <function Mysql.__del__ at 0x0000015996FF9430>
Traceback (most recent call last):
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\database\sqlCombiner.py", line 19, in __del__
self.close()
File "G:\QQbot\Mirai\amiya-bot\Amiya-Bot\database\sqlCombiner.py", line 124, in close
self.db.close()
AttributeError: 'Mysql' object has no attribute 'db'
任何群号均可稳定复现此问题
未测试其他的选项是否会触发此问题
具体日志如下:
loading tags data...
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 1.088 seconds.
Prefix dict has been built successfully.
loading operators data...
loading materials data...
Traceback (most recent call last):
File "/root/amiya-bot/Amiya-Bot/amiya.py", line 23, in
start()
File "/root/amiya-bot/Amiya-Bot/amiya.py", line 11, in start
HttpRequests().init_session()
File "/root/amiya-bot/Amiya-Bot/modules/network/httpRequests.py", line 35, in init_session
session = response['session']
TypeError: 'bool' object is not subscriptable
在 Console 中回报了一个 500 错误(Internal Server Error)
在控制台中(已脱敏):
[2022-03-27 20:42:44][INFO] Server.access - ***** - POST /group/getGroupByPages HTTP/1.1 500 Internal Server Error
[2022-03-27 20:42:44][INFO] Server.default - Exception in ASGI application
Traceback (most recent call last):
File "***\Python37\lib\site-packages\peewee.py", line 3177, in execute_sql
cursor.execute(sql, params or ())
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 148, in execute
result = self._query(query)
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 310, in _query
conn.query(q)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 775, in _read_query_result
result.read()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 725, in _read_packet
packet.raise_for_error()
File "***\Python37\lib\site-packages\pymysql\protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "***\Python37\lib\site-packages\pymysql\err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'"group" g left join group_active g2 on g.group_id = g2.group_id\' at line 1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "***\Python37\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 366, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "***\Python37\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "***\Python37\lib\site-packages\fastapi\applications.py", line 208, in __call__
await super().__call__(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
raise exc
File "***\Python37\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "***\Python37\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "***\Python37\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response
await self.app(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\exceptions.py", line 82, in __call__
raise exc
File "***\Python37\lib\site-packages\starlette\exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "***\Python37\lib\site-packages\starlette\routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\routing.py", line 259, in handle
await self.app(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\routing.py", line 61, in app
response = await func(request)
File "***\Python37\lib\site-packages\fastapi\routing.py", line 227, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "***\Python37\lib\site-packages\fastapi\routing.py", line 159, in run_endpoint_function
return await dependant.call(**values)
File "***\AmiyaBot\interfaces\group.py", line 82, in get_group_by_pages
res = group.execute_sql(sql).fetchall()
File "***\Python37\lib\site-packages\peewee.py", line 3184, in execute_sql
self.commit()
File "***\Python37\lib\site-packages\peewee.py", line 2950, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "***\Python37\lib\site-packages\peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "***\Python37\lib\site-packages\peewee.py", line 3177, in execute_sql
cursor.execute(sql, params or ())
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 148, in execute
result = self._query(query)
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 310, in _query
conn.query(q)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 775, in _read_query_result
result.read()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 725, in _read_packet
packet.raise_for_error()
File "***\Python37\lib\site-packages\pymysql\protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "***\Python37\lib\site-packages\pymysql\err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
peewee.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'"group" g left join group_active g2 on g.group_id = g2.group_id\' at line 1')
在 phpMyAdmin 中直接执行相同的语句,报错与底部信息一致
此 Bug 可以稳定复现
MySQL 版本:8.0.28 - MySQL Community Server - GPL
协议版本: 10
数据库客户端版本: libmysql - mysqlnd 8.1.2
Amiya 版本:Clone 仓库,确定同步了最新的更改
1免兔计算狗粮功能
1.1 计算干员升级所需的狗粮和龙门币数量
输入0~90级需要多少高级/中级/低级/基础作战记录(后期可以简化关键字呼叫)输出需要12004 (瞎编的数字)高级作战记录
1.2换算狗粮之间的数量
输入兔兔1高级等于多少中级/低级/基础
输出计算结果(狗粮数量和龙门币数量)
2查询干员专三到一级技能数值,希望实现-个查看 -一个技能全部数值而且是一个图浏览输入查看单个技能数值
例如:兔兔查看42三技能数值
输出结果
三技能一级数值贴图
三技能二级数值贴图
三技能三级数值贴图
以此类推到专三
全部合并成一-图查看
3查看半个月之内的方舟频道热门前十视频
输入前十热门明日方舟视频个人认为缩写前十视频的关键词就可以了
输出前十视频名单
格式:标题+bv号
top1视频格式
top2视频格式
top3视频格式
以此类推
4兔兔关于干员生日功能的部分
4.1是查看这个月/这天干员生日
输入兔免这个月有谁生日
输出,渲染- -张这个月的日历,上面标记干员生日具体日期
输入免兔今天有谁生日
输出,回复今天(写上今天日期, 1.22) 42生日,送上祝福台词
多个干员生日同一天情况, 安哲拉,空弦生日,祝福台词
4.2查看干员生日
输入兔兔42生日几号
输出42生日1.22
4.3订阅干员生日功能,订阅之后,到期时推送信息
输入兔兔订阅42生日(可以优化-下订阅台词)
输出,艾特订阅用户,提醒今天42生日
操作系统:windows10
软件版本:AmiyaBot-v5.0.5.exe
启动方式:浏览器访问127.0.0.1:5000
错误日志:
[2022-03-09 08:32:56][INFO] Server.access - 127.0.0.1:6899 - GET / HTTP/1.1 500 Internal Server Error
[2022-03-09 08:33:01][INFO] Server.default - Exception in ASGI application
Traceback (most recent call last):
File "uvicorn\protocols\http\h11_impl.py", line 364, in run_asgi
File "uvicorn\middleware\proxy_headers.py", line 75, in call
File "fastapi\applications.py", line 208, in call
File "starlette\applications.py", line 112, in call
File "starlette\middleware\errors.py", line 181, in call
File "starlette\middleware\errors.py", line 159, in call
File "starlette\middleware\cors.py", line 84, in call
File "starlette\exceptions.py", line 82, in call
File "starlette\exceptions.py", line 71, in call
File "starlette\routing.py", line 656, in call
File "starlette\routing.py", line 259, in handle
File "starlette\routing.py", line 61, in app
File "fastapi\routing.py", line 226, in app
File "fastapi\routing.py", line 159, in run_endpoint_function
File "core\network\httpServer_init_.py", line 81, in index
File "starlette\templating.py", line 89, in TemplateResponse
File "starlette\templating.py", line 76, in get_template
File "jinja2\environment.py", line 997, in get_template
File "jinja2\environment.py", line 958, in _load_template
File "jinja2\loaders.py", line 125, in load
File "jinja2\loaders.py", line 214, in get_source
jinja2.exceptions.TemplateNotFound: index.html
lm把刀架我脖子上让开的
同步卡池提示数据请求失败
纯萌新,求教
如题,PaddleOCR使用出错
RT,config文件并没有动过,之前有两个版本忘记开了,今天开了更新之后就无法使用127.0.0.1
显示:127.0.0.1 拒绝了我们的连接请求。
就是查询某关的攻略,数据可以由用户提交管理员审核
以下是部署项目近三个月以来收集的一些经用户反馈与我筛选认为需要优化的问题。
现在,想要查询一个干员的档案需要的操作比较复杂,如果想要查询一个干员的所有档案资料是非常繁琐的,但单独查询大多数时候并没有意义。
建议由需要一项项查询档案改为一次性呼出。
从用户角度看,应该是这样:
阿米娅查看(干员名称)(档案标题)x N → 阿米娅查看(干员名称)的档案资料(此处合并前 x N 次指令的输出结果)
如果想查询某干员的精一或精二立绘,可以直接使用“精一/精二”作为关键词而非现在的“精英一/精英二”,查询皮肤可直接使用皮肤名称检索而非先呼出阿米娅,查找皮肤列表后使用“阿米娅查看(干员名)第 N 个立绘”来检索。
如果想查询某干员的语音,在未检索到语音标题时返回语音列表以供检索。
如果想查询某干员的晋级材料,提供一个指令查询将该干员升级至满配需要多少材料。
例如指令为:阿米娅查询银灰满配材料
返回:
全技能专三总共需要的材料
一技能专三总共需要的材料
二技能专三总共需要的材料
三技能专三总共需要的材料
详见 #40
很多时候,用户不会去刻意记忆某卡池的名称(我相信你也不会)
所以,建议在卡池列表的返回数据中添加当期 up 的干员名称,以便检索。
顾名思义,加个干员盒子,记录用户抽取到的干员及潜能数,供用户查询。
我的实现思路:
大家都知道,每一个干员都有一个唯一的数字 id,那么,在数据库用户表中添加一个字段,记录每个用户抽取到的干员 id,潜能可以另开亿个字段记下来。
那么可以在用户抽卡时对抽卡结果进行处理(可能会导致结果返回延迟较高),或者采用延迟处理,先将用户的抽卡数据缓存,在闲时(每分钟消息量小于一个数值)时处理数据并操作数据库。
查询时,提出这个建议的人是这么设想的:
在返回开头列出现有的总干员数量,然后列出六星、五星、四星的数量
然后将所有干员的头像排好,获得了的点亮为彩色,没有获得的干员头像黑白
我个人再加一点:查询也需要消耗寻访凭证。不然服务器扛不住啊扛不住
理由是,console 对小屏设备太太太太不友好了......(或许可以开坑移动适配?)
然后就是,方便
还有就是,建议顺便加个寻访凭证奖励,鼓励用户当工具人添加别名
另外,在记录审核请求时,记得全局查重,以免一打开后台一半重复的
详见 #40
这个前端是拿什么框架开发的,挺清爽的
希望兔妈能够在项目根目录下加入存有当前版本号的文件
简单的不需要的新建issue的问题,可以在这里提问 (๑◡๑)
在 Console 中回报了一个 500 错误(Internal Server Error)
在控制台中(已脱敏):
[2022-03-27 20:42:44][INFO] Server.access - ***** - POST /group/getGroupByPages HTTP/1.1 500 Internal Server Error
[2022-03-27 20:42:44][INFO] Server.default - Exception in ASGI application
Traceback (most recent call last):
File "***\Python37\lib\site-packages\peewee.py", line 3177, in execute_sql
cursor.execute(sql, params or ())
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 148, in execute
result = self._query(query)
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 310, in _query
conn.query(q)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 775, in _read_query_result
result.read()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 725, in _read_packet
packet.raise_for_error()
File "***\Python37\lib\site-packages\pymysql\protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "***\Python37\lib\site-packages\pymysql\err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'"group" g left join group_active g2 on g.group_id = g2.group_id\' at line 1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "***\Python37\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 366, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "***\Python37\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "***\Python37\lib\site-packages\fastapi\applications.py", line 208, in __call__
await super().__call__(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
raise exc
File "***\Python37\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "***\Python37\lib\site-packages\starlette\middleware\cors.py", line 92, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "***\Python37\lib\site-packages\starlette\middleware\cors.py", line 147, in simple_response
await self.app(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\exceptions.py", line 82, in __call__
raise exc
File "***\Python37\lib\site-packages\starlette\exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "***\Python37\lib\site-packages\starlette\routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\routing.py", line 259, in handle
await self.app(scope, receive, send)
File "***\Python37\lib\site-packages\starlette\routing.py", line 61, in app
response = await func(request)
File "***\Python37\lib\site-packages\fastapi\routing.py", line 227, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "***\Python37\lib\site-packages\fastapi\routing.py", line 159, in run_endpoint_function
return await dependant.call(**values)
File "***\AmiyaBot\interfaces\group.py", line 82, in get_group_by_pages
res = group.execute_sql(sql).fetchall()
File "***\Python37\lib\site-packages\peewee.py", line 3184, in execute_sql
self.commit()
File "***\Python37\lib\site-packages\peewee.py", line 2950, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "***\Python37\lib\site-packages\peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "***\Python37\lib\site-packages\peewee.py", line 3177, in execute_sql
cursor.execute(sql, params or ())
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 148, in execute
result = self._query(query)
File "***\Python37\lib\site-packages\pymysql\cursors.py", line 310, in _query
conn.query(q)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "***\Python37\lib\site-packages\pymysql\connections.py", line 775, in _read_query_result
result.read()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "***\Python37\lib\site-packages\pymysql\connections.py", line 725, in _read_packet
packet.raise_for_error()
File "***\Python37\lib\site-packages\pymysql\protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "***\Python37\lib\site-packages\pymysql\err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
peewee.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'"group" g left join group_active g2 on g.group_id = g2.group_id\' at line 1')
在 phpMyAdmin 中直接执行相同的语句,报错与底部信息一致
此 Bug 可以稳定复现
MySQL 版本:8.0.28 - MySQL Community Server - GPL
协议版本: 10
数据库客户端版本: libmysql - mysqlnd 8.1.2
Amiya 版本:Clone 仓库,确定同步了最新的更改
报错懒得脱敏,反正兔妈你知道的对吧
总之,问题还在,天知道为什么
因为pcr相关bot都在使用cqhttp,所以使用一个框架会不会方便些ξ( ✿>◡❛)
rt,群里的苹果用户都这样。不知道是哪里的问题是否可以解决
现在的小游戏太少了,用户们都说不带劲
所以,多搞点(
比如,猜干员立绘模糊(
(其他小游戏我脑子不够用想不出来
如题,疫情查询出现问题,目前确认问题在于疫情数据加载时(由于腾讯api格式问题,共两次json.loads,此次问题出现在第二次loads),正在尝试解决,在解决之前疫情查询功能可能不可用
发生了什么一概不知,没有报错,但是就是漏了
天知道为什么,TMD
只知道没有维护完成的提示
私聊重启关了就开不了了,直接贴日志
Amiya控制台日志
Amiya-Bot-master\Amiya-Bot-master>python amiya.py
[2021-09-05 01:10:22][Info] Starting AmiyaBot...
[2021-09-05 01:10:22][Info] Init http session: *******
[2021-09-05 01:10:22][Info] Release session: *******
[2021-09-05 01:10:22][Info] Checking update...
[2021-09-05 01:10:22][Info] Version is up to date: 21.7.0
[2021-09-05 01:10:24][Info] Building operator's materials keywords dict...
[2021-09-05 01:10:24][Info] Building operator's stories keywords dict...
[2021-09-05 01:10:24][Info] Building operator's skins keywords dict...
[2021-09-05 01:10:25][Info] Building material's names keywords dict...
[2021-09-05 01:10:25][Info] Building operator's tags keywords dict...
[2021-09-05 01:10:25][Info] Building enemies's names keywords dict...
[2021-09-05 01:10:25][Info] AmiyaBot ready to connect, starting used 2 sec.
[2021-09-05 01:10:25][Info] Init websocket session: *******
[2021-09-05 01:10:25][Info] Websocket connect succeeded.
Amiya-Bot-master\Amiya-Bot-master>C:\Program: can't open file 'Files\Python37\python.exe': [Errno 2] No such file or directory
mcl日志
2021-09-05 01:10:05 V/Bot.: Initial heart() -> 重启
2021-09-05 01:10:06 V/Bot.: Event: FriendMessagePreSendEvent(target=Friend(), message=即将重新启动...)
2021-09-05 01:10:06 V/Bot.: Friend() <- 即将重新启动...
2021-09-05 01:10:06 V/Bot.: Event: FriendMessagePostSendEvent(target=Friend(), message=即将重新启动..., exception=null, receipt=net.mamoe.mirai.message.MessageReceipt@*)
OS: ubuntu 18.04 aliyunserver
python version: 3.7.5
mysql version: 8.0.23 for Linux on x86_64 (MySQL Community Server - GPL)
mirai: 自部署,使用mcl工具独立运行,并安装mirai-api-http
已完成资源导入,依赖安装,config也已修改为本机配置,第四步时出现如下问题
$ python3 amiya.py
Traceback (most recent call last):
File "amiya.py", line 8, in <module>
from message.messageHandler import MessageHandler
File "/home/nsc-root/Amiya-Bot/message/messageHandler.py", line 10, in <module>
from message.replies import Replies
File "/home/nsc-root/Amiya-Bot/message/replies/__init__.py", line 2, in <module>
from .emotion import emotion
File "/home/nsc-root/Amiya-Bot/message/replies/emotion.py", line 8, in <module>
amiya_name = database.config.get_amiya_name()
File "/home/nsc-root/Amiya-Bot/database/controller/configController.py", line 16, in get_amiya_name
self.get_config('amiya_name', 'good_name', True)['config_values'].split(','),
TypeError: 'NoneType' object is not subscriptable
$ python3 quickStart.py Test
Traceback (most recent call last):
File "quickStart.py", line 3, in <module>
from message.messageHandler import MessageHandler
File "/home/nsc-root/Amiya-Bot/message/messageHandler.py", line 10, in <module>
from message.replies import Replies
File "/home/nsc-root/Amiya-Bot/message/replies/__init__.py", line 2, in <module>
from .emotion import emotion
File "/home/nsc-root/Amiya-Bot/message/replies/emotion.py", line 8, in <module>
amiya_name = database.config.get_amiya_name()
File "/home/nsc-root/Amiya-Bot/database/controller/configController.py", line 16, in get_amiya_name
self.get_config('amiya_name', 'good_name', True)['config_values'].split(','),
TypeError: 'NoneType' object is not subscriptable
教程”通过代码部署“中mirai-console-set-up似乎挂了,手动配的话教程里的start.bat似乎是必要步骤。烦请大佬补上。
请问修改日签到发放的寻访凭证的数量的配置文件在哪((
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.