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

import失败 #50

Closed
NHCyrus opened this issue May 30, 2023 · 26 comments
Closed

import失败 #50

NHCyrus opened this issue May 30, 2023 · 26 comments
Labels
lack of dependency 缺少依赖文件 The runtime lacks necessary dependencies

Comments

@NHCyrus
Copy link

NHCyrus commented May 30, 2023

cannot import name 'pyautogui_win' from 'pyautogui' (D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\pyautogui_init.py)

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

Traceback (most recent call last):
File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\threading.py", line 926, in bootstrap_inner
self.run()
File "D:\download\GIA_Launcher_v0.6.0\source\common\base_threading.py", line 121, in run
self.loop()
File "D:\download\GIA_Launcher_v0.6.0\source\mission\mission_manager.py", line 33, in loop
self.exec_mission(mission_name)
File "D:\download\GIA_Launcher_v0.6.0\source\mission\mission_manager.py", line 18, in exec_mission
mission = get_mission_object(mission_name)
File "D:\download\GIA_Launcher_v0.6.0\source\mission\mission_index.py", line 5, in get_mission_object
import source.mission.missions.MissionAutoCollector
File "D:\download\GIA_Launcher_v0.6.0\source\mission\missions\MissionAutoCollector.py", line 3, in
from source.interaction.minimap_tracker import tracker
File "D:\download\GIA_Launcher_v0.6.0\source\interaction\minimap_tracker.py", line 2, in
from source.map.map import genshin_map
File "D:\download\GIA_Launcher_v0.6.0\source\map\map.py", line 2, in
from source.ui.ui import ui_control
File "D:\download\GIA_Launcher_v0.6.0\source\ui\ui.py", line 7, in
from source.interaction.interaction_core import itt
File "D:\download\GIA_Launcher_v0.6.0\source\interaction\interaction_core.py", line 813, in
itt = InteractionBGD()
File "D:\download\GIA_Launcher_v0.6.0\source\interaction\interaction_core.py", line 82, in init
import source.interaction.interaction_normal
File "D:\download\GIA_Launcher_v0.6.0\source\interaction\interaction_normal.py", line 4, in
import win32api, win32con, pyautogui
File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\pyautogui_init
.py", line 546, in
from . import _pyautogui_win as platformModule
ImportError: cannot import name 'pyautogui_win' from 'pyautogui' (D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\pyautogui_init.py)

@infstellar
Copy link
Owner

依赖没有安装成功,试试使用大陆下载配置,关闭代理然后卸载重装

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

使用的就是大陆下载配置 我重装一遍尝试一下

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

哦,config/settings/config.json文件已经被修改General.json 望md文件修改一下。

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

大陆下载配置还是缺少这个依赖。

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

我使用github下载尝试一下

@infstellar
Copy link
Owner

哦,config/settings/config.json文件已经被修改General.json 望md文件修改一下。

好的,感谢反馈

@infstellar
Copy link
Owner

应该是pyautogui的问题,你可以Google一下ImportError: cannot import name 'pyautogui_win' from 'pyautogui',也可能跟你的Windows版本有关系?

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

windows版本是win11 22h2 22621.1555

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

google出的是嵌套引用问题

@infstellar
Copy link
Owner

不是很懂⊙(・◇・)?在安装的时候有报错吗?或者复制一下安装的日志

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

2023-05-30 17:58:13.547 | INFO | source.util::70 - language set as: zh_CN
2023-05-30 17:58:15.599 | INFO | source.util::70 - language set as: zh_CN
2023-05-30 17:58:15.840 | INFO | main::26 - 正在初始化,请稍后
2023-05-30 17:58:15.864 | WARNING | source.common.static_lib:get_handle:22 - 找不到句柄
2023-05-30 17:58:15.882 | INFO | source.interaction.interaction_core:init:72 - InteractionBGD created
2023-05-30 17:58:15.895 | WARNING | common.static_lib:get_handle:22 - 找不到句柄
2023-05-30 17:58:16.124 | CRITICAL | main::41 - 导入依赖时错误
2023-05-30 17:58:16.125 | WARNING | source.error_code.util:log:32 - IMPORT_ERROR_1_1
2023-05-30 17:58:16.128 | ERROR | main::43 - cannot import name 'pyautogui_win' from 'pyautogui' (D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\pyautogui_init.py)
Traceback (most recent call last):

File "genshin_assistant.py", line 39, in
import source.common.generic_event
│ └ <module 'source.common' from 'D:\download\GIA_Launcher_v0.6.0\source\common\init.py'>
└ <module 'source' from 'D:\download\GIA_Launcher_v0.6.0\source\init.py'>

File "D:\download\GIA_Launcher_v0.6.0\source\common\generic_event.py", line 2, in
from source.interaction.interaction_core import itt

File "D:\download\GIA_Launcher_v0.6.0\source\interaction\interaction_core.py", line 813, in
itt = InteractionBGD()
└ <class 'source.interaction.interaction_core.InteractionBGD'>

File "D:\download\GIA_Launcher_v0.6.0\source\interaction\interaction_core.py", line 82, in init
import source.interaction.interaction_normal

File "D:\download\GIA_Launcher_v0.6.0\source\interaction\interaction_normal.py", line 4, in
import win32api, win32con, pyautogui
│ └ <module 'win32con' from 'D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\win32\lib\win32con.py'>
└ <module 'win32api' from 'D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\win32\win32api.pyd'>

File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\pyautogui_init_.py", line 546, in
from . import _pyautogui_win as platformModule

ImportError: cannot import name 'pyautogui_win' from 'pyautogui' (D:\download\GIA_Launcher_v0.6.0\toolkit\lib\site-packages\pyautogui_init.py)
2023-05-30 17:58:17.000 | INFO | source.webio.webio:main:37 - webio启动完成
2023-05-30 17:58:29.054 | INFO | source.webio.pages:_event_thread:294 - 未找到会话,可能由于窗口关闭。请刷新页面重试。

@NHCyrus
Copy link
Author

NHCyrus commented May 30, 2023

安装没有,安装完后自动运行就会出现这样的。

@infstellar
Copy link
Owner

没有遇到过这种问题⊙(・◇・)? 这几天我看看pyautogui的开发日志,看看能不能找到点东西

@infstellar
Copy link
Owner

感觉还是系统版本不兼容

@NHCyrus
Copy link
Author

NHCyrus commented May 31, 2023

那没办法了🌚

@infstellar
Copy link
Owner

看了一下,pyautogui在5月25号有一次更新,我在下次GIA更新的时候把版本回退到0.9.53看看能不能解决问题.

@NHCyrus
Copy link
Author

NHCyrus commented Jun 1, 2023

好的,昨天我用win10电脑测试时,发现无论是github源还是gitee源,都出现了pip 无法找到文件。 希望可以测试一下什么问题。

@gongfuture
Copy link

我刚更新了0.9.54,没有出现你这种情况,要不单独pip uninstall再install试试?

@NHCyrus
Copy link
Author

NHCyrus commented Jun 1, 2023

我的电脑是win11没有这个情况。但是还是无法导入。

@gongfuture
Copy link

刚看了一下你用的是launcher,那我就不大清楚了qwq,我是直接拉的源码跑的

@NHCyrus
Copy link
Author

NHCyrus commented Jun 1, 2023

我拉源码更离谱。拉都拉不下来完,拉一半不拉了,

@NHCyrus
Copy link
Author

NHCyrus commented Jun 1, 2023

能请教一下怎么拉的源码嘛。我每次都是拉着拉着出现错误。

@NHCyrus
Copy link
Author

NHCyrus commented Jun 1, 2023

能否将源码以压缩包的形式发给我呢,我的邮箱为NHCyrus@163.com.

@NHCyrus
Copy link
Author

NHCyrus commented Jun 2, 2023

Traceback (most recent call last):
File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\download\GIA_Launcher_v0.6.0\giainstaller.py", line 278, in
import installer_setup
File "D:\download\GIA_Launcher_v0.6.0\installer_setup.py", line 1, in
from source.util import *
File "D:\download\GIA_Launcher_v0.6.0\source\util.py", line 3, in
import win32gui, win32process, psutil, ctypes, pickle, traceback
ImportError: DLL load failed: 找不到指定的模块。
更换了一个win10设备 怎么错误变成这个了。

@infstellar
Copy link
Owner

Traceback (most recent call last): File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "D:\download\GIA_Launcher_v0.6.0\toolkit\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\download\GIA_Launcher_v0.6.0\giainstaller.py", line 278, in import installer_setup File "D:\download\GIA_Launcher_v0.6.0\installer_setup.py", line 1, in from source.util import * File "D:\download\GIA_Launcher_v0.6.0\source\util.py", line 3, in import win32gui, win32process, psutil, ctypes, pickle, traceback ImportError: DLL load failed: 找不到指定的模块。 更换了一个win10设备 怎么错误变成这个了。

缺少系统DLL依赖,安装C++全家桶试试

@infstellar infstellar added the lack of dependency 缺少依赖文件 The runtime lacks necessary dependencies label Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lack of dependency 缺少依赖文件 The runtime lacks necessary dependencies
Projects
None yet
Development

No branches or pull requests

3 participants