Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.0k views
in Technique[技术] by (71.8m points)

【小白】easytrader初始化对象失败,如何定位此类问题?

直接安装了模块,然后调用了一下初始化。

import easytrader
if __name__ == '__main__':
    user = easytrader.use('gj_client')
    
 C:projectseasyTradevenvScriptspython.exe C:/projects/easyTrade/main/main.py
Traceback (most recent call last):
  File "C:/projects/easyTrade/main/main.py", line 5, in <module>
    user = easytrader.use('gj_client')
  File "C:projectseasyTradevenvlibsite-packageseasytraderapi.py", line 57, in use
    from .gj_clienttrader import GJClientTrader
  File "C:projectseasyTradevenvlibsite-packageseasytradergj_clienttrader.py", line 6, in <module>
    import pywinauto
  File "C:projectseasyTradevenvlibsite-packagespywinauto\__init__.py", line 87, in <module>
    from .sysinfo import UIA_support
  File "C:projectseasyTradevenvlibsite-packagespywinautosysinfo.py", line 44, in <module>
    import comtypes  # noqa: E402
  File "C:projectseasyTradevenvlibsite-packagescomtypes\__init__.py", line 1176, in <module>
    class IPersist(IUnknown):
  File "C:projectseasyTradevenvlibsite-packagescomtypes\__init__.py", line 1181, in IPersist
    ( ['out'], POINTER(GUID), 'pClassID' )),
  File "C:projectseasyTradevenvlibsite-packagescomtypes\__init__.py", line 1099, in COMMETHOD
    from comtypes.automation import VARIANT
  File "C:projectseasyTradevenvlibsite-packagescomtypesautomation.py", line 12, in <module>
    from comtypes import npsupport
  File "C:projectseasyTradevenvlibsite-packagescomtypes
psupport.py", line 5, in <module>
    import numpy
  File "C:projectseasyTradevenvlibsite-packages
umpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:projectseasyTradevenvlibsite-packages
umpy\__init__.py", line 302, in _win_os_check
    raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\projects\easyTrade\venv\lib\site-packages\numpy\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

Process finished with exit code 1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

numpy版本有1.19.4版本有问题,变更到1.19.3问题解决。

大佬们遇到类似问题如何定位?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...