po-lan / zhenxun_plugins_TZseries

我个人开发或进行魔改的zhenxun插件
12 stars 8 forks source link

福利金报错 #37

Closed PackageInstaller closed 1 year ago

PackageInstaller commented 1 year ago

修改了真寻的bag_user表的get_total_gold和spend_total_gold以及gold的类型为int8后,向真寻要钱就报错,有人要不报错,但是获得的金币为0,以下是报错详情

01-10 16:31:16 [ERROR] nonebot | Running Matcher(type='message', module=extensive_plugin.zhenxun_plugins_TZseries.TZfulijin) failed. Traceback (most recent call last): File "asyncpg/protocol/protocol.pyx", line 168, in prepare return await waiter File "asyncpg/protocol/codecs/base.pyx", line 206, in asyncpg.protocol.protocol.Codec.encode return self.encoder(self, settings, buf, obj) File "asyncpg/protocol/codecs/base.pyx", line 111, in asyncpg.protocol.protocol.Codec.encode_scalar self.c_encoder(settings, buf, obj) File "asyncpg/pgproto/./codecs/int.pyx", line 60, in asyncpg.pgproto.pgproto.int4_encode OverflowError: value out of int32 range

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/Neko/QQBot/zhenxun_bot/bot.py", line 21, in nonebot.run() File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/init.py", line 273, in run get_driver().run(*args, **kwargs) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 172, in run uvicorn.run( File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run server.run() File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/message.py", line 142, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/message.py", line 188, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 727, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 702, in simple_run await handler( File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/dependencies/init.py", line 108, in call return await cast(Callable[..., Awaitable[R]], self.call)(*values) File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_pluginsTZseries/TZfulijin.py", line 69, in await BagUser.add_gold(uid, group, gold) File "/home/Neko/QQBot/zhenxun_bot/models/bag_user.py", line 106, in add_gold await user.update( File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/crud.py", line 170, in apply row = await bind.first(clause) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/engine.py", line 748, in first return await conn.first(clause, multiparams, **params) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/engine.py", line 328, in first return await result.execute(one=True) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/dialects/base.py", line 214, in execute rows = await cursor.async_execute( File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/dialects/asyncpg.py", line 184, in async_execute result, stmt = await getattr(conn, "_do_execute")(query, executor, timeout) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/asyncpg/connection.py", line 1730, in _do_execute result = await executor(stmt, None) File "asyncpg/protocol/protocol.pyx", line 183, in bind_execute args_buf = state._encode_bind_msg(args) File "asyncpg/protocol/prepared_stmt.pyx", line 197, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg raise exceptions.DataError( asyncpg.exceptions.DataError: invalid input for query argument $3: 340432325184161 (value out of int32 range)

PackageInstaller commented 1 year ago

Screenshot_20230110_162408

PackageInstaller commented 1 year ago

Screenshot_20230110_171347 报错又变了