XiaoMiku01 / fansMedalHelper

新版B站粉丝牌助手 全自动升级粉丝牌
https://doc.loveava.top/
GNU General Public License v3.0
1.25k stars 831 forks source link

[Bug]: 青龙部署这两天运行有点问题,不清楚什么原因。 #198

Closed BlackSpacee closed 1 month ago

BlackSpacee commented 1 month ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

粉丝牌助手 版本

0.3.8

运行环境

Ubuntu

运行架构

ARM [64] (别名:AArch64 / ARMv8)

部署方式

其它(请在下方说明)

粉丝牌数量

49

日志记录(可选)

## 开始执行... 2024-09-04 20:40:42

run builtin code error: No module named 'requests'

2024-09-04 20:40:43  B站粉丝牌助手  当前版本为: 0.3.8
2024-09-04 20:40:59    API /x/v2/account/mine 调用出现异常: 
2024-09-04 20:40:59  B站粉丝牌助手  
Traceback (most recent call last):

  File "/ql/data/scripts/fansMedalHelper/index.py", line 17, in <module>
    run()
    └ <function run at 0x735d7827c5e0>

  File "/ql/data/scripts/fansMedalHelper/main.py", line 117, in run
    loop.run_until_complete(main())
    │    │                  └ <function main at 0x735d781dfc40>
    │    └ <function BaseEventLoop.run_until_complete at 0x735d78c9d300>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>

  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 641, in run_until_complete
    self.run_forever()
    │    └ <function BaseEventLoop.run_forever at 0x735d78c9d260>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 608, in run_forever
    self._run_once()
    │    └ <function BaseEventLoop._run_once at 0x735d78c9f060>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
    handle._run()
    │      └ <function Handle._run at 0x735d78be9440>
    └ <Handle Task.task_wakeup(<_GatheringFu...imeoutError()>)>
  File "/usr/local/lib/python3.11/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
    │    │            │    │           │    └ <member '_args' of 'Handle' objects>
    │    │            │    │           └ <Handle Task.task_wakeup(<_GatheringFu...imeoutError()>)>
    │    │            │    └ <member '_callback' of 'Handle' objects>
    │    │            └ <Handle Task.task_wakeup(<_GatheringFu...imeoutError()>)>
    │    └ <member '_context' of 'Handle' objects>
    └ <Handle Task.task_wakeup(<_GatheringFu...imeoutError()>)>

> File "/ql/data/scripts/fansMedalHelper/main.py", line 86, in main
    await asyncio.gather(*initTasks)
          │       │       └ [<coroutine object BiliUser.init at 0x735d78279cb0>]
          │       └ <function gather at 0x735d78c905e0>
          └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>

  File "/ql/data/scripts/fansMedalHelper/src/user.py", line 180, in init
    if not await self.loginVerify():
                 │    └ <function BiliUser.loginVerify at 0x735d781ddc60>
                 └ <src.user.BiliUser object at 0x735d78283ad0>

  File "/ql/data/scripts/fansMedalHelper/src/user.py", line 49, in loginVerify
    loginInfo = await self.api.loginVerift()
                      │    │   └ <function BiliApi.loginVerift at 0x735d781df4c0>
                      │    └ <src.api.BiliApi object at 0x735d77e9c450>
                      └ <src.user.BiliUser object at 0x735d78283ad0>

  File "/ql/data/scripts/fansMedalHelper/src/api.py", line 311, in loginVerift
    return await self.__get(url, params=SingableDict(params).signed, headers=self.headers)
                 │          │           │            │                       │    └ {'User-Agent': 'Mozilla/5.0 BiliDroid/6.73.1 (bbcallen@gmail.com) os/android model/Mi 10 Pro mobi_app/android build/6731100 c...
                 │          │           │            │                       └ <src.api.BiliApi object at 0x735d77e9c450>
                 │          │           │            └ {'access_key': '6411dc59c30d37075f8177a74eb39a91', 'actionKey': 'appkey', 'appkey': '4409e2ce8ffd12b8', 'ts': 1725453644}
                 │          │           └ <class 'src.api.SingableDict'>
                 │          └ 'https://app.bilibili.com/x/v2/account/mine'
                 └ <src.api.BiliApi object at 0x735d77e9c450>

  File "/ql/data/scripts/fansMedalHelper/src/api.py", line 75, in wrapper
    raise e

  File "/ql/data/scripts/fansMedalHelper/src/api.py", line 61, in wrapper
    result = await func(*args, **kwargs)
                   │     │       └ {'params': {'access_key': '6411dc59c30d37075f8177a74eb39a91', 'actionKey': 'appkey', 'appkey': '4409e2ce8ffd12b8', 'ts': 1725...
                   │     └ (<src.api.BiliApi object at 0x735d77e9c450>, 'https://app.bilibili.com/x/v2/account/mine')
                   └ <function BiliApi.__get at 0x735d781defc0>

  File "/ql/data/scripts/fansMedalHelper/src/api.py", line 130, in __get
    async with self.session.get(*args, **kwargs) as resp:
               │    │       │    │       └ {'params': {'access_key': '6411dc59c30d37075f8177a74eb39a91', 'actionKey': 'appkey', 'appkey': '4409e2ce8ffd12b8', 'ts': 1725...
               │    │       │    └ ('https://app.bilibili.com/x/v2/account/mine',)
               │    │       └ <function ClientSession.get at 0x735d781c3880>
               │    └ <aiohttp.client.ClientSession object at 0x735d78283bd0>
               └ <src.api.BiliApi object at 0x735d77e9c450>

  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1353, in __aenter__
    self._resp = await self._coro
    │    │             │    └ <member '_coro' of '_BaseRequestContextManager' objects>
    │    │             └ <aiohttp.client._RequestContextManager object at 0x735d77e981f0>
    │    └ <member '_resp' of '_BaseRequestContextManager' objects>
    └ <aiohttp.client._RequestContextManager object at 0x735d77e981f0>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 573, in _request
    with timer:
         └ <aiohttp.helpers.TimerContext object at 0x735d77e9ded0>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 713, in __exit__
    raise asyncio.TimeoutError from None
          │       └ <class 'TimeoutError'>
          └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>

TimeoutError
2024-09-04 20:40:59  B站粉丝牌助手  An error has been caught in function '_run', process 'MainProcess' (19127), thread 'MainThread' (126845319211816):
Traceback (most recent call last):

  File "/ql/data/scripts/fansMedalHelper/index.py", line 17, in <module>
    run()
    └ <function run at 0x735d7827c5e0>

  File "/ql/data/scripts/fansMedalHelper/main.py", line 117, in run
    loop.run_until_complete(main())
    │    │                  └ <function main at 0x735d781dfc40>
    │    └ <function BaseEventLoop.run_until_complete at 0x735d78c9d300>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>

  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 641, in run_until_complete
    self.run_forever()
    │    └ <function BaseEventLoop.run_forever at 0x735d78c9d260>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 608, in run_forever
    self._run_once()
    │    └ <function BaseEventLoop._run_once at 0x735d78c9f060>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
    handle._run()
    │      └ <function Handle._run at 0x735d78be9440>
    └ <Handle Task.task_wakeup(<_GatheringFu...e 'isLogin'")>)>
> File "/usr/local/lib/python3.11/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
    │    │            │    │           │    └ <member '_args' of 'Handle' objects>
    │    │            │    │           └ <Handle Task.task_wakeup(<_GatheringFu...e 'isLogin'")>)>
    │    │            │    └ <member '_callback' of 'Handle' objects>
    │    │            └ <Handle Task.task_wakeup(<_GatheringFu...e 'isLogin'")>)>
    │    └ <member '_context' of 'Handle' objects>
    └ <Handle Task.task_wakeup(<_GatheringFu...e 'isLogin'")>)>

  File "/ql/data/scripts/fansMedalHelper/main.py", line 94, in main
    itertools.chain.from_iterable(await asyncio.gather(*catchMsg))
    │         │     │                   │       │       └ [<coroutine object BiliUser.sendmsg at 0x735d7823d460>]
    │         │     │                   │       └ <function gather at 0x735d78c905e0>
    │         │     │                   └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
    │         │     └ <method 'from_iterable' of 'itertools.chain' objects>
    │         └ <class 'itertools.chain'>
    └ <module 'itertools' (built-in)>

  File "/ql/data/scripts/fansMedalHelper/src/user.py", line 202, in sendmsg
    if not self.isLogin:
           └ <src.user.BiliUser object at 0x735d78283ad0>

AttributeError: 'BiliUser' object has no attribute 'isLogin'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x735d7824c310>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x735d78232820>, 621087.207070959)]']
connector: <aiohttp.connector.TCPConnector object at 0x735d78b0f4d0>
/usr/local/lib/python3.11/asyncio/base_events.py:608: RuntimeWarning: coroutine 'BiliUser.start' was never awaited
  self._run_once()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2024-09-04 20:40:59  B站粉丝牌助手  任务结束,等待下一次执行。
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x735d78283bd0>

## 执行结束... 2024-09-04 20:40:59  耗时 17 秒     

补充说明(可选)

HK Debian 机器,同步执行,Bark 推送,其他的没啥大变。不清楚是我这边环境的问题还是,前两天是 Corn 时间到了后会运行差不多一半一半粉丝牌的时候会推送失败(部分加了部分没加),今天手动运行报了这样的错误。