You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImportError Traceback (most recent call last)
Cell In[2], line 1
----> 1 user = et.use('universal_client')
File ~\miniconda3\envs\test\lib\site-packages\easytrader\api.py:67, in use(broker, debug, **kwargs)
64 return GFClientTrader()
66 if broker.lower() in ["universal_client", "通用同花顺客户端"]:
---> 67 from easytrader.universal_clienttrader import UniversalClientTrader
69 return UniversalClientTrader()
71 if broker.lower() in ["ths", "同花顺客户端"]:
File ~\miniconda3\envs\test\lib\site-packages\easytrader\universal_clienttrader.py:6
3 import pywinauto
4 import pywinauto.clipboard
----> 6 from easytrader import grid_strategies
7 from . import clienttrader
10 class UniversalClientTrader(clienttrader.BaseLoginClientTrader):
File ~\miniconda3\envs\test\lib\site-packages\easytrader\grid_strategies.py:15
13 from easytrader.log import logger
14 from easytrader.utils.captcha import captcha_recognize
---> 15 from easytrader.utils.win_gui import SetForegroundWindow, ShowWindow, win32defines
17 if TYPE_CHECKING:
18 # pylint: disable=unused-import
19 from easytrader import clienttrader
File ~\miniconda3\envs\test\lib\site-packages\easytrader\utils\win_gui.py:3
1 # coding:utf-8
2 from pywinauto import win32defines
----> 3 from pywinauto.win32functions import SetForegroundWindow, ShowWindow
ImportError: cannot import name 'SetForegroundWindow' from 'pywinauto.win32functions'
The text was updated successfully, but these errors were encountered:
env
OS: win10
PYTHON_VERSION: 3.9.12
EASYTRADER_VERSION: '0.23.0'
BROKER_TYPE: universal_client
pywinauto 0.6.8
problem
跑文档里的例子
user = et.use('universal_client')
会出现错误ImportError Traceback (most recent call last)
Cell In[2], line 1
----> 1 user = et.use('universal_client')
File ~\miniconda3\envs\test\lib\site-packages\easytrader\api.py:67, in use(broker, debug, **kwargs)
64 return GFClientTrader()
66 if broker.lower() in ["universal_client", "通用同花顺客户端"]:
---> 67 from easytrader.universal_clienttrader import UniversalClientTrader
69 return UniversalClientTrader()
71 if broker.lower() in ["ths", "同花顺客户端"]:
File ~\miniconda3\envs\test\lib\site-packages\easytrader\universal_clienttrader.py:6
3 import pywinauto
4 import pywinauto.clipboard
----> 6 from easytrader import grid_strategies
7 from . import clienttrader
10 class UniversalClientTrader(clienttrader.BaseLoginClientTrader):
File ~\miniconda3\envs\test\lib\site-packages\easytrader\grid_strategies.py:15
13 from easytrader.log import logger
14 from easytrader.utils.captcha import captcha_recognize
---> 15 from easytrader.utils.win_gui import SetForegroundWindow, ShowWindow, win32defines
17 if TYPE_CHECKING:
18 # pylint: disable=unused-import
19 from easytrader import clienttrader
File ~\miniconda3\envs\test\lib\site-packages\easytrader\utils\win_gui.py:3
1 # coding:utf-8
2 from pywinauto import win32defines
----> 3 from pywinauto.win32functions import SetForegroundWindow, ShowWindow
ImportError: cannot import name 'SetForegroundWindow' from 'pywinauto.win32functions'
The text was updated successfully, but these errors were encountered: