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

在其它工作目录下无法通过绝对路径运行mdt GUI #58

Open
rumia-san opened this issue Jul 17, 2022 · 0 comments
Open

在其它工作目录下无法通过绝对路径运行mdt GUI #58

rumia-san opened this issue Jul 17, 2022 · 0 comments

Comments

@rumia-san
Copy link

Describe the bug
在其它工作路径下以绝对路径运行(如通过Everything搜索mdt.exe运行)会报错
因为mdt_cv.py的第81行是以相对路径加载文件'./data/hash.json'的

调用栈

Traceback (most recent call last):
  File "mdt_gui.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "mdt_service.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "mdt.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "mdt_cv.py", line 81, in <module>
FileNotFoundError: [Errno 2] No such file or directory: './data/hash.json'

To Reproduce
在其它的工作路径下通过绝对路径运行mdt.exe
如通过Everything搜索mdt.exe运行
或者在powershell里以绝对路径运行mdt.exe

Expected behavior
可以在其它目录下运行mdt.exe

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here.

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

1 participant