Python Forum
can't open excel with my macos - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: can't open excel with my macos (/thread-22110.html)



can't open excel with my macos - dcc - Oct-30-2019

I hope to help,thank you
What happened to aeosa?

Error:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 482, in __call__ return self.AS_appdata.target().event(self._code, params, atts, codecs=self.AS_appdata).send(timeout, sendflags) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aeosa/aem/aemsend.py", line 92, in send raise EventError(errornum, errormsg, eventresult) aem.aemsend.EventError: Command failed: The user has declined permission. (-1743)
The above exception was the direct cause of the following exception:

Error:
Traceback (most recent call last): File "/Users/dcc/tool/python-tool/works/AutomationTest/testDal/dalPublicMethods.py", line 381, in <module> p.save_creatphone() File "/Users/dcc/tool/python-tool/works/AutomationTest/testDal/dalPublicMethods.py", line 215, in save_creatphone raise e File "/Users/dcc/tool/python-tool/works/AutomationTest/testDal/dalPublicMethods.py", line 206, in save_creatphone sheet = xw.Book(testMethods.order_info) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/main.py", line 481, in __init__ for wb in app.books: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/main.py", line 62, in __iter__ for impl in self.impl: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/_xlmac.py", line 201, in __iter__ n = len(self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/_xlmac.py", line 185, in __len__ return self.app.xl.count(each=kw.workbook) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 518, in __call__ raise CommandError(self, (args, kargs), e, self.AS_appdata) from e appscript.reference.CommandError: Command failed: OSERROR: -1743 MESSAGE: The user has declined permission. COMMAND: app(pid=37782).count(each=k.workbook)
and
Error:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 482, in __call__ return self.AS_appdata.target().event(self._code, params, atts, codecs=self.AS_appdata).send(timeout, sendflags) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aeosa/aem/aemsend.py", line 92, in send raise EventError(errornum, errormsg, eventresult) aem.aemsend.EventError: Command failed: The user has declined permission. (-1743)
The above exception was the direct cause of the following exception:

Error:
Traceback (most recent call last): File "/Users/dcc/tool/python-tool/works/AutomationTest/testDal/dalPublicMethods.py", line 381, in <module> p.save_creatphone(0,"1111",'2222') File "/Users/dcc/tool/python-tool/works/AutomationTest/testDal/dalPublicMethods.py", line 215, in save_creatphone raise e File "/Users/dcc/tool/python-tool/works/AutomationTest/testDal/dalPublicMethods.py", line 202, in save_creatphone app = xw.App(visible=False, add_book=False) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/main.py", line 212, in __init__ self.impl = xlplatform.App(spec=spec, add_book=add_book) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/_xlmac.py", line 65, in __init__ self.activate() # Makes it behave like on Windows File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xlwings/_xlmac.py", line 100, in activate appscript.app('System Events').processes[its.unix_id == self.pid].frontmost.set(True) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 518, in __call__ raise CommandError(self, (args, kargs), e, self.AS_appdata) from e appscript.reference.CommandError: Command failed: OSERROR: -1743 MESSAGE: The user has declined permission. COMMAND: app('/System/Library/CoreServices/System Events.app').processes[its.unix_id == 38103].frontmost.set(True)