Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题]在更新资源与使用地图材料功能时遇到的问题 #472

Closed
TNCNET opened this issue Sep 12, 2023 · 4 comments
Closed

[问题]在更新资源与使用地图材料功能时遇到的问题 #472

TNCNET opened this issue Sep 12, 2023 · 4 comments
Labels
question Further information is requested

Comments

@TNCNET
Copy link

TNCNET commented Sep 12, 2023

确认

  • 我的Bot版本已更新到最新,且已尝试使用nb paimon install更新依赖库
  • 我已查阅文档-常见问题,无相关解决方案
  • 我已确认issue中没有类似的问题或仍然得不到解决

环境信息

  • 系统版本: Windows server 2012 R2 datacenter /x64
  • Python版本: 3.10.5/x64
  • Nonebot2版本: 2.1.0
  • NB-CLI版本:1.1.2
  • 使用什么运行:Powershell

问题描述

此次遇到的问题有两个:
1)通过 nb paimon 更新资源时,若更新图标资源,则会显示如下情况:或参考附图一
原神图标资源 ---------------------------------------- 100% • 133/133 bytes • ? •
下载原神图标资源时出错: File is not a zip file

此处,已经排除网络与代理问题;无论使用任何节点尝试更新都会提示该错误。

2)在使用“材料地图”时,在输入命令后:(命令在附图二)
前台,即QQ处是无响应的。查看日志得知,此时应用端产生如下报错:(可以参考图三)
--//日志开始//--

_09-13 03:56:59 [SUCCESS] nonebot | OneBot V11 2987649316 | [message.private.friend]: Message 408405375 from 504040102 '
材料地图 铁块 璃月'
09-13 03:56:59 [INFO] nonebot | Event will be handled by Matcher(type='message', module=LittlePaimon.plugins.star_rail_w
iki)
09-13 03:56:59 [INFO] nonebot | Event will be handled by Matcher(type='message', module=LittlePaimon.plugins.Paimon_Wiki
)
09-13 03:56:59 [INFO] nonebot | Matcher(type='message', module=LittlePaimon.plugins.star_rail_wiki) running complete
C:\Program Files\Python310\lib\site-packages\sklearn\cluster_kmeans.py:1412: FutureWarning: The default value of n_ini t will change from 10 to 'auto' in 1.4. Set the value of n_init explicitly to suppress the warning
super()._check_params_vs_input(X, default_n_init=10)
C:\Program Files\Python310\lib\site-packages\sklearn\cluster_kmeans.py:1412: FutureWarning: The default value of n_ini t will change from 10 to 'auto' in 1.4. Set the value of n_init explicitly to suppress the warning
super().check_params_vs_input(X, default_n_init=10)
09-13 03:57:11 [INFO] nonebot | Matcher(type='message', module=LittlePaimon.plugins.Paimon_Wiki) running complete
09-13 03:57:11 [ERROR] nonebot | Running Matcher(type='message', module=LittlePaimon.plugins.Paimon_Wiki) failed.
Traceback (most recent call last):
File "C:\Users\Administrator\keqing\bot.py", line 37, in
nonebot.run(app="mp_main:app", access_log=False)
File "C:\Program Files\Python310\lib\site-packages\nonebot_init
.py", line 333, in run
get_driver().run(*args, **kwargs)
File "C:\Program Files\Python310\lib\site-packages\nonebot\drivers\fastapi.py", line 199, in run
uvicorn.run(
File "C:\Program Files\Python310\lib\site-packages\uvicorn\main.py", line 587, in run
server.run()
File "C:\Program Files\Python310\lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Program Files\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "C:\Program Files\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "C:\Program Files\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Program Files\Python310\lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher
await _run_matcher(

File "C:\Program Files\Python310\lib\site-packages\nonebot\message.py", line 419, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Program Files\Python310\lib\site-packages\nonebot\internal\matcher\matcher.py", line 759, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Program Files\Python310\lib\site-packages\nonebot\internal\matcher\matcher.py", line 734, in simple_run
await handler(
File "C:\Program Files\Python310\lib\site-packages\nonebot\dependencies_init
.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\Administrator\keqing\LittlePaimon\plugins\Paimon_Wiki_init_.py", line 170, in _
result = await get_full_map(names, map_)
File "C:\Users\Administrator\keqing\LittlePaimon\plugins\Paimon_Wiki\draw_map.py", line 166, in get_full_map
group_point = img.k_means_points(points, 600)
File "C:\Users\Administrator\keqing\LittlePaimon\plugins\Paimon_Wiki\genshinmap\img.py", line 78, in k_means_points
XYPoint(pos_array_[:, 0].min(), pos_array_[:, 1].min()),
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed_

--//日志结束//--
备注:此处重新生成过地图。但生成期间无错误。

问题截图

第一部分:
图片
//图一 使用nb paimon更新时的情况,即问题(1).

第二部分
Screenshot_2023-09-13-03-57-44-605_com tencent mo
//图二 前端(QQ)输入的命令。

图片
//图三 后台日志报错

复现步骤[可选]

请参考上面描述。

备注

暂无。如果需要的话,将主动补充需要的信息。

@TNCNET TNCNET added the question Further information is requested label Sep 12, 2023
@CMHopeSunshine
Copy link
Owner

资源包源站可能出了点问题,尝试手动下载:https://github.cherishmoon.fun/https://github.com/CMHopeSunshine/GenshinWikiMap/raw/master/resources/genshin_resources.zip

材料地图用法错了,璃月是无效地图名,它会识别为叫璃月的材料,但是不存在这种材料。地图名只有提瓦特|渊下宫|层岩巨渊这三种,不能细分到国家。

@TNCNET
Copy link
Author

TNCNET commented Sep 13, 2023

资源包源站可能出了点问题,尝试手动下载:https://github.cherishmoon.fun/https://github.com/CMHopeSunshine/GenshinWikiMap/raw/master/resources/genshin_resources.zip

材料地图用法错了,璃月是无效地图名,它会识别为叫璃月的材料,但是不存在这种材料。地图名只有提瓦特|渊下宫|层岩巨渊这三种,不能细分到国家。

好的
1)经过测试,手动下载和覆盖数据包没问题。
2)另外修正命令格式后,试了几次,发现就查询铁块的坐标会出现日志报错,而其他的不会出现这个问题,最多是太快了提示冷却。
ps,手动查询,发现目前米游社的地图上铁块坐标数量在779处,测试时,白铁块(644处)也没有遇到问题。是不是单纯数量太多了?

ps2,部分资源只会显示一处的问题。如竹子,仅显示了璃月市区的部分。

@CMHopeSunshine
Copy link
Owner

CMHopeSunshine commented Sep 13, 2023

那有可能是数量问题...
由于有反馈材料地图生成图片会消耗大量内存,导致进程被杀甚至服务器卡死,所以对范围做了限制,只显示最密集的最大4000*4000区域,一些分布比较分散的材料所显示的区域就会比较小。

@TNCNET
Copy link
Author

TNCNET commented Sep 13, 2023

那有可能是数量问题... 由于有反馈材料地图生成图片会消耗大量内存,导致进程被杀甚至服务器卡死,所以对范围做了限制,只显示最密集的最大4000*4000区域,一些分布比较分散的材料所显示的区域就会比较小。

好的,了解了,多谢。那就关闭这个问题咯:)

@TNCNET TNCNET closed this as completed Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants