xlwings error: not opening excel workbook getting an error upon call wb.open

Keywords: python python-3.x xlwings

Question: 

xlwings works fine on my computer, but when I try to transfer the same set up to another computer it seems to not open correctly giving me this error

Traceback (most recent call last):

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings_xlwindows.py", line 432, in call

return Book(xl=self.xl(name_or_index))

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings_xlwindows.py", line 152, in call

v = self._inner(*args, **kwargs)

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\win32com\client\dynamic.py", line 197, in call

return self._get_good_object_(self._oleobj_.Invoke(*allArgs),self._olerepr_.defaultDispatchName,None)

pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352565), None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings\main.py", line 2776, in open

impl = self.impl(name)

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings_xlwindows.py", line 434, in call

raise KeyError(name_or_index)

KeyError: 'output2019-06-03.11-40timeseries_5-31-2019scrubbed.xlsx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "Computation.py", line 157, in

xwWb = xw.Book("output" + timeName + os.path.split(file_path)[1])

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings\main.py", line 488, in init

impl = app.books.open(fullname).impl

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings\main.py", line 2787, in open

impl = self.impl.open(fullname)

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings_xlwindows.py", line 443, in open

return Book(xl=self.xl.Open(fullname))

File "C:\Users\base7268\AppData\Local\Programs\Python\Python37\lib\site-packages\xlwings_xlwindows.py", line 63, in call

v = self.__method(*args, **kwargs)

File ">", line 8, in Open

pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft Excel', 'Open method of Workbooks class failed', 'xlmain11.chm', 0, -2146827284), None)

Answers: