nyaoouo / FFDraw

A Drawing Framework for ffxiv
GNU General Public License v3.0
154 stars 36 forks source link

权限问题?Windows api error, error_code: 0X5 #16

Open fatinghenji opened 1 year ago

fatinghenji commented 1 year ago

报错:

Exception in thread Thread-5 (start_server):
Traceback (most recent call last):
  File "D:\FFXIV\FFDraw\nylib\utils\win32\injection.py", line 20, in get_python_base_address
    return process.get_module_by_name(handle, python_dll_name).lpBaseOfDll
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 63, in get_module_by_name
    raise KeyError(module_name)
KeyError: b'python310.dll'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "G:\ailearning\anaconda\envs\FFDraw\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "G:\ailearning\anaconda\envs\FFDraw\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\inject_rpc.py", line 66, in start_server
    res = injection.exec_shell_code(self.process_handle, shell_code.encode('utf-8'), True)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\injection.py", line 29, in exec_shell_code
    return process.remote_call(handle, get_python_base_address(handle, auto_inject) + pyfunc_offset(b'PyRun_SimpleString'), shell_code)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\injection.py", line 23, in get_python_base_address
    base = process.inject_dll(handle, python_dll_info.filename)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 69, in inject_dll
    return remote_call(handle, load_library_a_address, filepath)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 233, in remote_call
    start_thread(handle, code_address)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 110, in start_thread
    raise exception.WinAPIError()
nylib.utils.win32.exception.WinAPIError: Windows api error, error_code: 0X5

这个错误是由于程序无法找到名为 python310.dll 的模块而引发的。您可以检查一下您的系统中是否安装了 Python 3.10,以及该文件是否存在于您的系统中。此外,错误代码 0X5 表示您没有足够的权限来执行某些操作。您可以尝试以管理员身份运行程序,看看是否能解决问题。

nyaoouo commented 1 year ago

建议使用venv,conda我没有测试

fatinghenji commented 1 year ago

我用编译好的版本:0.15.1也能遇到相同的错误,感觉应该不是虚拟环境的问题 image

nyaoouo commented 1 year ago

试试尝试用py311建立venv运行……主要我也不太清楚闪退的原因()

fatinghenji commented 1 year ago

相同

Exception in thread Thread-5 (start_server):
Traceback (most recent call last):
  File "D:\FFXIV\FFDraw\nylib\utils\win32\injection.py", line 20, in get_python_base_address
    return process.get_module_by_name(handle, python_dll_name).lpBaseOfDll
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 63, in get_module_by_name
    raise KeyError(module_name)
KeyError: b'python311.dll'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "G:\ailearning\anaconda\envs\FFDraw\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "G:\ailearning\anaconda\envs\FFDraw\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\inject_rpc.py", line 66, in start_server
    res = injection.exec_shell_code(self.process_handle, shell_code.encode('utf-8'), True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FFXIV\FFDraw\nylib\utils\win32\injection.py", line 29, in exec_shell_code
    return process.remote_call(handle, get_python_base_address(handle, auto_inject) + pyfunc_offset(b'PyRun_SimpleString'), shell_code)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FFXIV\FFDraw\nylib\utils\win32\injection.py", line 23, in get_python_base_address
    base = process.inject_dll(handle, python_dll_info.filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 69, in inject_dll
    return remote_call(handle, load_library_a_address, filepath)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 233, in remote_call
    start_thread(handle, code_address)
  File "D:\FFXIV\FFDraw\nylib\utils\win32\process.py", line 110, in start_thread
    raise exception.WinAPIError()
nylib.utils.win32.exception.WinAPIError: Windows api error, error_code: 0X5
fatinghenji commented 1 year ago

使用一键包,报错:

Exception in thread Thread-5 (start_server):
Traceback (most recent call last):
  File "G:\ailearning\anaconda\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "G:\ailearning\anaconda\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\inject_rpc.py", line 66, in start_server
    res = injection.exec_shell_code(self.process_handle, shell_code.encode('utf-8'), True)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\injection.py", line 29, in exec_shell_code
    return process.remote_call(handle, get_python_base_address(handle, auto_inject) + pyfunc_offset(b'PyRun_SimpleString'), shell_code)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\process.py", line 233, in remote_call
    start_thread(handle, code_address)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\process.py", line 110, in start_thread
    raise exception.WinAPIError()
nylib.utils.win32.exception.WinAPIError: Windows api error, error_code: 0X5
bocvv commented 1 year ago

我也遇到这个问题了,err code是0x57

fatinghenji commented 1 year ago

补充下日志:

[2023-06-05 19:02:41,210]       [DEBUG] [root]  current Pid:%s
[2023-06-05 19:02:41,217]       [DEBUG] [FFDraw]        set path_encoding:gbk
[2023-06-05 19:02:41,220]       [DEBUG] [urllib3.connectionpool]        Starting new HTTPS connection (1): raw.fastgit.org:443
[2023-06-05 19:02:41,651]       [DEBUG] [SqPack/ExdManager]     init exd with language en
[2023-06-05 19:02:41,685]       [DEBUG] [SqPack/Pack]   loading Mode: Read Id: PackId(b'exd'/ffxiv/0) Tid: 41616 FullPath: D:\FFXIV\最终幻想XIV\game\sqpack\ffxiv\0a0000.win32.dat0
[2023-06-05 19:02:41,713]       [DEBUG] [SqPack/File]   reading b'exd/root.exl'...
[2023-06-05 19:02:41,717]       [DEBUG] [urllib3.connectionpool]        Starting new HTTPS connection (1): ffxiv-opcodes.nyao.xyz:443
[2023-06-05 19:02:42,113]       [DEBUG] [urllib3.connectionpool]        https://ffxiv-opcodes.nyao.xyz:443 "GET /ChatServerIpc.csv HTTP/1.1" 200 None
[2023-06-05 19:02:42,113]       [WARNING]       [Sniffer]       Failed to update ChatServerIpc.csv, Invalid content type
[2023-06-05 19:02:42,258]       [DEBUG] [urllib3.connectionpool]        https://ffxiv-opcodes.nyao.xyz:443 "GET /ChatClientIpc.csv HTTP/1.1" 200 None
[2023-06-05 19:02:42,258]       [WARNING]       [Sniffer]       Failed to update ChatClientIpc.csv, Invalid content type
[2023-06-05 19:02:42,290]       [DEBUG] [urllib3.connectionpool]        https://raw.fastgit.org:443 "GET /nyaoouo/FFDraw/master/version.txt HTTP/1.1" 200 27
[2023-06-05 19:02:42,291]       [INFO]  [UpdateChecker] local version: (0, 15, 1)    remote version: (0, 15, 1)
[2023-06-05 19:02:42,420]       [DEBUG] [urllib3.connectionpool]        https://ffxiv-opcodes.nyao.xyz:443 "GET /ZoneServerIpc.csv HTTP/1.1" 200 9911
[2023-06-05 19:02:42,428]       [INFO]  [Sniffer]       Updated ZoneServerIpc.csv
[2023-06-05 19:02:42,567]       [DEBUG] [urllib3.connectionpool]        https://ffxiv-opcodes.nyao.xyz:443 "GET /ZoneClientIpc.csv HTTP/1.1" 200 1925
[2023-06-05 19:02:42,568]       [INFO]  [Sniffer]       Updated ZoneClientIpc.csv
[2023-06-05 19:02:42,570]       [DEBUG] [SqPack/File]   reading b'exd/Action.exh'...
[2023-06-05 19:02:42,683]       [DEBUG] [SqPack/File]   reading b'exd/ClassJobCategory.exh'...
[2023-06-05 19:02:42,684]       [DEBUG] [SqPack/File]   reading b'exd/ClassJobCategory_0_chs.exd'...
[2023-06-05 19:02:42,712]       [DEBUG] [FFDraw]        disable plugin fps/Fps
[2023-06-05 19:02:42,712]       [DEBUG] [FFDraw]        disable plugin radar/Radar
[2023-06-05 19:02:42,712]       [DEBUG] [FFDraw]        disable plugin raid_helper/RaidHelper
[2023-06-05 19:02:42,712]       [DEBUG] [FFDraw]        disable plugin tts/TTS
[2023-06-05 19:02:42,888]       [DEBUG] [InjectHandler] python base 0x7ffc457b0000
Exception in thread Thread-5 (start_server):
Traceback (most recent call last):
  File "G:\ailearning\anaconda\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "G:\ailearning\anaconda\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\inject_rpc.py", line 66, in start_server
    res = injection.exec_shell_code(self.process_handle, shell_code.encode('utf-8'), True)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\injection.py", line 29, in exec_shell_code
    return process.remote_call(handle, get_python_base_address(handle, auto_inject) + pyfunc_offset(b'PyRun_SimpleString'), shell_code)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\process.py", line 233, in remote_call
    start_thread(handle, code_address)
  File "D:\FFXIV\FFD\FFDraw\nylib\utils\win32\process.py", line 110, in start_thread
    raise exception.WinAPIError()
nylib.utils.win32.exception.WinAPIError: Windows api error, error_code: 0X5

其中有两个WARNING,和本问题相关吗?

[2023-06-05 19:02:42,113]       [WARNING]       [Sniffer]       Failed to update ChatServerIpc.csv, Invalid content type
[2023-06-05 19:02:42,258]       [DEBUG] [urllib3.connectionpool]        https://ffxiv-opcodes.nyao.xyz:443 "GET /ChatClientIpc.csv HTTP/1.1" 200 None
[2023-06-05 19:02:42,258]       [WARNING]       [Sniffer]       Failed to update ChatClientIpc.csv, Invalid content type
[2023-06-05 19:02:42,290]       [DEBUG] [urllib3.connectionpool]        https://raw.fastgit.org:443 "GET /nyaoouo/FFDraw/master/version.txt HTTP/1.1" 200 27
wmh90 commented 1 year ago

遇到了相同的问题

Exception in thread Thread-3 (start_server):
Traceback (most recent call last):
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\injection.py", line 22, in get_python_base_address
    return process.get_module_by_name(handle, python_dll_name).lpBaseOfDll
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\process.py", line 79, in get_module_by_name
    raise KeyError(module_name)
KeyError: b'python311.dll'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Tools\python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "D:\Tools\python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\inject_rpc.py", line 87, in start_server
    res = injection.exec_shell_code(self.process_handle, shell_code.encode('utf-8'), auto_inject=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\injection.py", line 42, in exec_shell_code
    py_base = get_python_base_address(handle, auto_inject)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\injection.py", line 25, in get_python_base_address
    base = process.inject_dll(handle, python_dll_info.filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\process.py", line 85, in inject_dll
    return remote_call(handle, load_library_a_address, filepath)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\process.py", line 251, in remote_call
    start_thread(handle, code_address)
  File "D:\FF14\FFDraw-master\NyLib\nylib\utils\win32\process.py", line 126, in start_thread
    raise exception.WinAPIError()
nylib.utils.win32.exception.WinAPIError: Windows api error, error_code: 0X5 (拒绝访问。)
dalabuddy commented 7 months ago

Did anyone fix this?有人解决了吗?

status102 commented 7 months ago

Did anyone fix this?有人解决了吗?

同conda报拒绝访问,改为使用vnev后解决