JRCSTU / CO2MPAS-TA

EU's Type-Approving vehicle simulator predicting NEDC CO2 emissions from WLTP
https://co2mpas.readthedocs.io/
European Union Public License 1.1
25 stars 13 forks source link

Datasync tool cannot work with network shares #9

Open mitrapo opened 7 years ago

mitrapo commented 7 years ago

When trying to open the Datasync template file from a network share, I get this error in the log:

2016-12-13 15:51:51,014:co2mpas.datasync:ERROR:Failed reading sync-sheet(0: //computer_name/SHARE$/Folder/Desktop/datasync.xlsx) due to: Loading sheet([//computer_name/SHARE$/Folder/Desktop/datasync.xlsx]None) failed due to: [Errno 2] No such file or directory: '\\SHARE$\\Folder\\Desktop\\datasync.xlsx'
2016-12-13 15:51:51,014:tkui:CRITICAL:Unhandled TkUI exception:
Traceback (most recent call last):
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\_lasso.py", line 177, in _open_sheet
    lasso.url_file, lasso.sh_name, base_sheet=lasso.sheet)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\io\backend.py", line 248, in fetch_sheet
    sheet = self._open_sheet(url, sheet_id)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\io\backend.py", line 117, in _open_sheet
    sheet = be.open_sheet(url, sheet_id)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\io\_xlrd.py", line 222, in open_sheet
    book = self._open_book(wb_url)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\io\_xlrd.py", line 239, in _open_book
    book = xlrd.open_workbook(path, **ropts)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\xlrd\__init__.py", line 395, in open_workbook
    with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '\\SHARE$\\Folder\\Desktop\\datasync.xlsx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\tkinter\__init__.py", line 1550, in __call__
    return self.func(*args)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\co2mpas\tkui.py", line 1607, in run_sync
    force=True)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\co2mpas\datasync.py", line 549, in do_datasync
    tables.collect_tables(ref_xlref, *sync_xlrefs)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\co2mpas\datasync.py", line 455, in collect_tables
    lasso = self.consume_next_xlref(ref_xlref, xleash.Lasso())
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\co2mpas\datasync.py", line 438, in consume_next_xlref
    return self._consume_next_xlref(xlref, lasso)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\co2mpas\datasync.py", line 407, in _consume_next_xlref
    return_lasso=True)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\_lasso.py", line 389, in lasso
    lasso = ranger.do_lasso(xlref, **context_kwds)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\_lasso.py", line 243, in do_lasso
    sheet = self._open_sheet(lasso)
  File "C:\Users\Mpourabd\Downloads\co2mpas_ALLINONE-64bit-v1.4.1\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\pandalone\xleash\_lasso.py", line 180, in _open_sheet
    raise ValueError(msg % (lasso.url_file, lasso.sh_name, ex))
ValueError: Loading sheet([//computer_name/SHARE$/Folder/Desktop/datasync.xlsx]None) failed due to: [Errno 2] No such file or directory: '\\SHARE$\\Folder\\Desktop\\datasync.xlsx'
2016-12-13 15:51:51,014:tkui:CRITICAL:Unhandled TkUI exception: (<tkinter.Tk object .>, <class 'ValueError'>, ValueError("Loading sheet([//computer_name/SHARE$/Folder/Desktop/datasync.xlsx]None) failed due to: [Errno 2] No such file or directory: '\\\\SHARE$\\\\Folder\\\\Desktop\\\\datasync.xlsx'",), <traceback object at 0x0000000020B1DBC8>)