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

Bug: 未处理非动车组的查询流程错误 #11

Open
tianyisama opened this issue Oct 11, 2024 · 0 comments
Open

Bug: 未处理非动车组的查询流程错误 #11

tianyisama opened this issue Oct 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tianyisama
Copy link

指令

train K656 10-12

环境

python 3.9
nonebot-plugin-cnrail 0.3.0
httpx 0.27.2

错误日志

10-11 22:34:55 [ERROR] nonebot_plugin_cnrail | Failed to query train info
Traceback (most recent call last):
File "C:\nb\bot.py", line 17, in
nonebot.run()
File "C:\nb.venv\lib\site-packages\nonebot_init_.py", line 335, in run
get_driver().run(*args, **kwargs)
File "C:\nb.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in
run
uvicorn.run(
File "C:\nb.venv\lib\site-packages\uvicorn\main.py", line 587, in run
server.run()
File "C:\nb.venv\lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Program Files\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 629, in run_
until_complete
self.run_forever()
File "C:\Program Files\Python39\lib\asyncio\windows_events.py", line 316, in r
un_forever
super().run_forever()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 596, in run_
forever
self._run_once()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 1890, in _ru
n_once
handle._run()
File "C:\Program Files\Python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\nb.venv\lib\site-packages\nonebot\message.py", line 476, in check_an
d_run_matcher
await _run_matcher(
File "C:\nb.venv\lib\site-packages\nonebot\message.py", line 428, in run_mat
cher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\nb.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line
850, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\nb.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line
825, in simple_run
await handler(
File "C:\nb.venv\lib\site-packages\nonebot\dependencies_init
.py", line 94
, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)

File "C:\nb.venv\lib\site-packages\nonebot_plugin_cnrail_main_.py", line 9
5, in _
train_info = await query_train_info(train_no, date_obj.isoformat())
File "C:\nb.venv\lib\site-packages\nonebot_plugin_cnrail\data_source.py", lin
e 114, in query_train_info
sn_data = await get_train_sn(train_code)
File "C:\nb.venv\lib\site-packages\nonebot_plugin_cnrail\data_source.py", lin
e 52, in get_train_sn
resp.raise_for_status()
File "C:\nb.venv\lib\site-packages\httpx_models.py", line 763, in raise_for_
status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '500 Internal Server Error' for url 'https:/
/rail.moefactory.com/api/emuSerialNumber/query'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/St
atus/500

附带日志

{"code":500,"data":null,"message":"Response status code does not indicate success: 404 (Not Found)."}

@XieXiLin2 XieXiLin2 added the bug Something isn't working label Oct 11, 2024
@XieXiLin2 XieXiLin2 changed the title 查询错误 Bug: 未处理非动车组的查询流程错误 Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants