天天看点

bug python

c:\python38\lib\site-packages\pywinauto\application.py:1062: userwarning: 32-bit application should be automated using 32-bit python (you use 64-bit python)

warnings.warn(

traceback (most recent call last):

file "c:\python38\lib\site-packages\pywinauto\application.py", line 248, in __resolve_control

ctrl = wait_until_passes(

file "c:\python38\lib\site-packages\pywinauto\timings.py", line 458, in wait_until_passes

raise err

pywinauto.timings.timeouterror

during handling of the above exception, another exception occurred:

file "f:/gzh/easyquant/main.py", line 76, in <module>

m.load_strategy()

file "f:\gzh\easyquant\easyquant\main_engine.py", line 189, in load_strategy

self.load(self._names, strategy_file)

file "f:\gzh\easyquant\easyquant\main_engine.py", line 155, in load

new_strategy = strategy_class(user=self.user, log_handler=self.log, main_engine=self, g_trade=self.g_trade)

file "f:\gzh\easyquant\easyquant\strategy\strategytemplate.py", line 31, in __init__

self.init()

file "f:\gzh\easyquant\strategies\策略1股票.py", line 53, in init

self.positions_list = self.get_positions_all()

file "f:\gzh\easyquant\strategies\策略1股票.py", line 293, in get_positions_all

positions = self.user.position

file "c:\python38\lib\site-packages\easytrader\clienttrader.py", line 148, in position

return self._get_grid_data(self._config.common_grid_control_id)

file "c:\python38\lib\site-packages\easytrader\clienttrader.py", line 490, in _get_grid_data

return self.grid_strategy_instance.get(control_id)

file "c:\python38\lib\site-packages\easytrader\grid_strategies.py", line 195, in get

self._trader.app.top_window().edit1.set_edit_text(temp_path)

file "c:\python38\lib\site-packages\pywinauto\application.py", line 362, in __getattribute__

ctrls = self.__resolve_control(self.criteria)

file "c:\python38\lib\site-packages\pywinauto\application.py", line 259, in __resolve_control

raise e.original_exception

file "c:\python38\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes

func_val = func(*args, **kwargs)

file "c:\python38\lib\site-packages\pywinauto\application.py", line 220, in __get_ctrl

ctrl = self.backend.generic_wrapper_class(findwindows.find_element(**ctrl_criteria))

file "c:\python38\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element

elements = find_elements(**kwargs)

file "c:\python38\lib\site-packages\pywinauto\findwindows.py", line 303, in find_elements

elements = findbestmatch.find_best_control_matches(best_match, wrapped_elems)

file "c:\python38\lib\site-packages\pywinauto\findbestmatch.py", line 533, in find_best_control_matches

raise matcherror(items = name_control_map.keys(), tofind = search_text)

pywinauto.findbestmatch.matcherror: could not find 'edit1' in 'dict_keys(['afxmdiframe42s', '资金余额afxmdiframe42s', 'afxwnd42s', '', '0', '1', '2', 'ccustomtabctrl', '3', 'ccustomtabctrl0', 'ccustomtabctrl1', 'ccustomtabctrl2', 'hexinscrollwndafx:400000:0', 'afx:400000:0', 'hexinscrollwnd', 'afxwnd42s0', 'afxwnd42s1', 'afxwnd42s2', 'hexinscrollwnd2', 'hexinscrollwnd2afxwnd42s', '4', 'treeview', '5', 'scrollbar', '资金余额#32770', '#32770', '6', 'ccustomtabctrl3', 'static', '资金余额', '资金余额static', 'static0', 'static1', 'static2', '冻结金额static', '冻结金额', 'static3', '可用金额', '可用金额static', 'static4', '1797.39', '1797.39static', 'static5', '1000.00static', '1000.00', 'static6', '797.39', '797.39static', 'static7', '可取金额static', '可取金额', 'static8', '股票市值static', '股票市值', 'static9', '总 资 产static', '总 资 产', 'static10', '797.390', '797.391', '797.392', '797.39static0', '797.39static1', '797.39static2', 'static11', '370.00static', '370.00', 'static12', '2167.39static', '2167.39', '修改成本价', '修改成本价button', 'button', 'static13', '797.39static3', 'static14', '现金资产', '现金资产static', 'static15', '1797.390', '1797.391', '1797.392', '1797.39static0', '1797.39static1', '1797.39static2', '现金资产ccustomtabctrl', '1797.39ccustomtabctrl', 'ccustomtabctrl4', 'static16', '国债逆回购为全部持仓中标准券逆回购部分的单列明细展示', '国债逆回购为全部持仓中标准券逆回购部分的单列明细展示static', 'static17', ' 默认为您开启资产刷新,持仓盈亏计算公式为(市价-保本价)*数量,其中保本价为计入卖出费用的成本价,该计算方式优先保障实时性,盈亏数值仅供参考,实际盈亏情况以对账单为准。\n 若您须查询对账单盈亏数据,请前往“系统-系统设置-自动刷新资产数据”菜单设置为否,并重新登录。static', ' 默认为您开启资产刷新,持仓盈亏计算公式为(市价-保本价)*数量,其中保本价为计入卖出费用的成本价,该计算方式优先保障实时性,盈亏数值仅供参考,实际盈亏情况以对账单为准。\n 若您须查询对账单盈亏数据,请前往“系统-系统设置-自动刷新资产数据”菜单设置为否,并重新登录。', 'hexinscrollwndafx:400000:00', 'hexinscrollwndafx:400000:01', 'hexinscrollwndafx:400000:02', 'afx:400000:00', 'afx:400000:01', 'afx:400000:02', 'hexinscrollwnd0', 'hexinscrollwnd1', 'hexinscrollwnd3', 'afxwnd42s3', 'hexinscrollwnd20', 'hexinscrollwnd21', 'hexinscrollwnd22', 'hexinscrollwnd2afxwnd42s0', 'hexinscrollwnd2afxwnd42s1', 'hexinscrollwnd2afxwnd42s2', 'custom1cvirtualgridctrl', 'cvirtualgridctrl', 'custom1', '现金资产scrollbar', 'scrollbar0', 'scrollbar1', 'scrollbar2', '7', 'toolbar', '8', '#327700', '#327701', '#327702', '9', 'combobox', '10', 'combobox0', 'combobox1', 'combobox2', '11', 'button0', 'button1', 'button2', '12', 'button3', '13', 'button4', '14', 'button5', 'statusbar', '完成statusbar', '完成'])'

process finished with exit code 1