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

win 2012系统无法运行 #5

Open
moian98 opened this issue Jun 22, 2022 · 4 comments
Open

win 2012系统无法运行 #5

moian98 opened this issue Jun 22, 2022 · 4 comments

Comments

@moian98
Copy link

moian98 commented Jun 22, 2022

报错:

PermissionError: [WinError 5] 拒绝访问。

百度了一会,还是没找到相关解决方案。 T.T

@MeetWq
Copy link
Member

MeetWq commented Jun 22, 2022

发一下完整的日志

@moian98
Copy link
Author

moian98 commented Jun 22, 2022

06-22 21:03:19 [ERROR] nonebot | Running matcher <Matcher from src.plugins.nonebot_plugin_cchess, type=message, priority=13, temp=False> failed.
Traceback (most recent call last):
  File "C:/Users/Administrator/Desktop/YYY/qingya_new\bot.py", line 33, in <module>
    nonebot.run(app="__mp_main__:app")
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\__init__.py", line 261, in run
    get_driver().run(*args, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\drivers\fastapi.py", line 170, in run
    uvicorn.run(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\uvicorn\main.py", line 463, in run
    server.run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 316, in run_forever
    super().run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 570, in run_forever
    self._run_once()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1859, in _run_once
    handle._run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\message.py", line 146, in _check_matcher
    await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\message.py", line 196, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\internal\matcher.py", line 668, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\internal\matcher.py", line 635, in simple_run
    await handler(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\dependencies\__init__.py", line 92, in __call__
    return await self.call(**values)
  File "C:\Users\Administrator\Desktop\YYY\qingya_new\src\plugins\nonebot_plugin_cchess\__init__.py", line 107, in _
    await handle_cchess(matcher, event, argv + args)
  File "C:\Users\Administrator\Desktop\YYY\qingya_new\src\plugins\nonebot_plugin_cchess\__init__.py", line 230, in handle_cchess
    await ai_player.engine.open()
  File "C:\Users\Administrator\Desktop\YYY\qingya_new\src\plugins\nonebot_plugin_cchess\engine.py", line 20, in open
    self._process = await asyncio.create_subprocess_exec(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1630, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 389, in _make_subprocess_transport
    transp = _WindowsSubprocessTransport(self, protocol, args, shell,
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_subprocess.py", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 885, in _start
    self._proc = windows_utils.Popen(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_utils.py", line 153, in __init__
    super().__init__(args, stdin=stdin_rfd, stdout=stdout_wfd,
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1311, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] 拒绝访问。

@moian98
Copy link
Author

moian98 commented Jun 22, 2022

忘记了,我是在本地电脑测试。系统是win11

@reisen7
Copy link

reisen7 commented Jul 17, 2022

win11,我也是遇到这个问题,后来发现应该是路径不对
image
需要在.env中将路径写到具体的exe应用中,然后最好把文件只可读去掉,权限也弄弄,就成功了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants