Traceback (most recent call last):


 "C:\Python\envs\py37\lib\site-packages\ipykernel\kernelbase.py", line 267, in dispatch_shell

yield gen.maybe_future(handler(stream, idents, msg))


 "C:\Python\envs\py37\lib\site-packages\tornado\gen.py", line 1133, in run

value = future.result()


 "C:\Python\envs\py37\lib\site-packages\tornado\gen.py", line 326, in wrapper

yielded = next(result)


 "C:\Python\envs\py37\lib\site-packages\ipykernel\kernelbase.py", line 572, in complete_request

matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))


 "C:\Python\envs\py37\lib\site-packages\ipykernel\ipkernel.py", line 348, in do_complete

return self._experimental_do_complete(code, cursor_pos)


 "C:\Python\envs\py37\lib\site-packages\ipykernel\ipkernel.py", line 373, in _experimental_do_complete

completions = list(_rectify_completions(code, raw_completions))


 "C:\Python\envs\py37\lib\site-packages\IPython\core\completer.py", line 485, in rectify_completions

completions = list(completions)


 "C:\Python\envs\py37\lib\site-packages\IPython\core\completer.py", line 1809, in completions

for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):


 "C:\Python\envs\py37\lib\site-packages\IPython\core\completer.py", line 1853, in _completions

full_text=full_text, cursor_line=cursor_line, cursor_pos=cursor_column)


 "C:\Python\envs\py37\lib\site-packages\IPython\core\completer.py", line 1977, in _complete

text = self.splitter.split_line(line_buffer, cursor_pos)


 "C:\Python\envs\py37\lib\site-packages\IPython\core\completer.py", line 563, in split_line

l = line if cursor_pos is None else line[:cursor_pos]
TypeError: 'NoneType' object is not subscriptable

Traceback (most recent call last):


 "D:/Personal/Dropbox (个人)/Projects/Python/Stocks/Stock_autotrader.py", line 3, in <module>

user = easytrader.use('ths')


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\easytrader\api.py", line 57, in use

from .clienttrader import ClientTrader


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\easytrader\clienttrader.py", line 12, in <module>

from pywinauto import findwindows, timings


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\__init__.py", line 89, in <module>

from . import findwindows


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\findwindows.py", line 42, in <module>

from . import controls


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\controls\__init__.py", line 36, in <module>

from . import uiawrapper # register "uia" back-end (at the end of uiawrapper module)


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\controls\uiawrapper.py", line 47, in <module>

from ..uia_defines import IUIA


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\uia_defines.py", line 181, in <module>

pattern_ids = _build_pattern_ids_dic()


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\uia_defines.py", line 169, in _build_pattern_ids_dic

if hasattr(IUIA().ui_automation_client, cls_name):


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\uia_defines.py", line 50, in __call__

cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs)


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\pywinauto\uia_defines.py", line 60, in __init__

self.UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll')


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\comtypes\client\_generate.py", line 110, in GetModule

mod = _CreateWrapper(tlib, pathname)


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\comtypes\client\_generate.py", line 184, in _CreateWrapper

mod = _my_import(fullname)


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\comtypes\client\_generate.py", line 24, in _my_import

return __import__(fullname, globals(), locals(), ['DUMMY'])


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\comtypes\gen\_944DE083_8FB8_45CF_BCB7_C477ACB2F897_0_1_0.py", line 331, in <module>

( ['out', 'retval'], POINTER(POINTER(IUIAutomationElement)), 'element' )),


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\comtypes\__init__.py", line 329, in __setattr__

self._make_methods(value)


 "D:\IDE\Miniconda\main\envs\stocks\lib\site-packages\comtypes\__init__.py", line 698, in _make_methods

prototype = WINFUNCTYPE(restype, *argtypes)


 "D:\IDE\Miniconda\main\envs\stocks\lib\ctypes\__init__.py", line 123, in WINFUNCTYPE

class WinFunctionType(_CFuncPtr):
TypeError: item 2 in _argtypes_ passes a union by value, which is unsupported.
