kitUIN / nonebot_tools

nonebot2 插件工具箱
MIT License
11 stars 5 forks source link

网易云音乐下载报错 #8

Closed lgc2333 closed 2 years ago

lgc2333 commented 2 years ago
11-19 01:07:20 [ERROR] nonebot | Running matcher <Matcher from nonebot-plugin-ncm, type=message, priority=2, temp=False> failed.
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\stu-files\bot\go-cq\nonebot2\bot.py", line 38, in <module>
    nonebot.run(app="__mp_main__:app")
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\__init__.py", line 278, in run
    get_driver().run(host, port, *args, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\drivers\fastapi.py", line 256, in run
    uvicorn.run(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\main.py", line 447, in run
    server.run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\server.py", line 68, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 316, in run_forever
    super().run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever
    self._run_once()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once
    handle._run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 128, in _check_matcher
    await _run_matcher(Matcher, bot, event, state)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 156, in _run_matcher
    await matcher.run(bot, event, state)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\matcher.py", line 597, in run
    await handler(self, bot, event, self.state)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\handler.py", line 64, in __call__
    await self.func(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot-plugin-ncm\__init__.py", line 63, in music_reply_receive
    await Ncm(bot, event).download(ids=[int(nid[1])])
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot-plugin-ncm\data_source.py", line 81, in download
    data: list = self.api.track.GetTrackAudio(song_ids=ids, bitrate=3200 * 1000)["data"]
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\pyncm\apis\__init__.py", line 36, in wrapper
    rsp = requestFunc(url,plain,method)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\pyncm\apis\__init__.py", line 66, in wrapper
    payload = func(*a,**k)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\pyncm\apis\__init__.py", line 104, in EapiCryptoRequest
    cookies = {
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\cookies.py", line 328, in __getitem__
    return self._find_no_duplicates(name)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\cookies.py", line 394, in _find_no_duplicates
    raise CookieConflictError('There are multiple cookies with name, %r' % (name))
requests.cookies.CookieConflictError: There are multiple cookies with name, 'MUSIC_A_T'
kitUIN commented 2 years ago

等待API提供者修复

kitUIN commented 2 years ago

已修复。 使用pip3 install nonebot-plugin-ncm==1.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 或者pip3 install nonebot-plugin-ncm==1.1.0 升级到最新版使用