HibiKier/nonebot_plugin_gamedraw

BUG: 更新时报错

Closed this issue · 5 comments

log:

07-07 14:02:23 [ERROR] uvicorn | Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 526, in lifespan
    async for item in self.lifespan_context(app):
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 467, in default_lifespan
    await self.startup()
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 502, in startup
    await handler()
  File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_gamedraw/async_update_game_info.py", line 58, in async_update_game
    await asyncio.gather(*tasks)
  File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_gamedraw/pretty_handle.py", line 52, in update_pretty_info
    data, code = await update_info(url, 'pretty_card')
  File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_gamedraw/update_game_info.py", line 58, in update_info
    await download_img(member_dict['头像'], game_name, name)
  File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_gamedraw/util.py", line 52, in download_img
    async with aiofiles.open(DRAW_PATH + f'/draw_card/{path}/{codename}.png', 'wb') as f:
  File "/usr/local/lib/python3.8/dist-packages/aiofiles/base.py", line 75, in __aenter__
    self._obj = await self._coro
  File "/usr/local/lib/python3.8/dist-packages/aiofiles/threadpool/__init__.py", line 80, in _open
    f = yield from loop.run_in_executor(executor, cb)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '.../data/draw_card//draw_card/pretty/【///WARNING GATE///】xinguangfeng.png'

OS:Ubuntu
Python:3.8
Nonebot:2.0.0a13

貌似是‘///’保存路径转义问题

咦,你这个插件的版本是?

Name: nonebot-plugin-gamedraw
Version: 0.1.8.8.6

确定插件加载正确了吗?'/' 这些字符在 6/3 日已经更新过了,而且我刚在 linux 上测试0.1.8.8.6图片是正常下载的

虚拟环境和主环境的插件都更新到0.1.8.8.6了,确实依然存在该问题。

好吧,仔细看了下,更新了usr下的插件,但运行用了sudo权限,我的···