Skip to content

Unable to convert synergi to opendss in Ubuntu 22.04 #425

@AAndersn

Description

@AAndersn

Unable to convert from synergi to opendss using ditto-cli or python library.

Machine: Ubuntu 22.04

Ditto Branch: tried with both fuse_wenbo and synergi_read_fixes

Models: PNNL Campus and Nantucket (private models)

Error message:

/home/shared_user/ditto/ditto/readers/synergi/mdbtools/bin/mdb-tables: error while loading shared libraries: libmdb.so.2: cannot open shared object file: No such file or directory
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
Cell In[2], line 1
----> 1 test_Synergi_to_opendss()

Cell In[1], line 36, in test_Synergi_to_opendss()
     34 m = Store()
     35 r = Reader(data_folder_path=os.path.join(current_directory, './nantucket',model))
---> 36 r.parse(m)
     37 #TODO: Log properly
     38 # print('>Synergi model {model} read...'.format(model=model))
     39 output_path = tempfile.TemporaryDirectory()

File ~/ditto/ditto/readers/synergi/read.py:130, in Reader.parse(self, model)
    126 if self.ware_house_input_file is not None:
    127     self.ware_house_input_file = os.path.join(
    128         os.path.dirname(self.input_file), self.ware_house_input_file
    129     )
--> 130     self.SynergiData = DbParser(
    131         self.input_file, warehouse=self.ware_house_input_file
    132     )
    133 else:
    134     self.SynergiData = DbParser(self.input_file)

File ~/ditto/ditto/readers/synergi/db_parser.py:25, in DbParser.__init__(self, input_file, **kwargs)
     22 if "warehouse" in kwargs:
     23     self.paths["warehouse"] = kwargs["warehouse"]
---> 25 self.ParseSynergiDatabase()

File ~/ditto/ditto/readers/synergi/db_parser.py:32, in DbParser.ParseSynergiDatabase(self)
     28 """
     29 Use Pandas Access to convert the MDB tables to Pandas DataFrames.
     30 """
     31 print("Opening synergie database - ", self.paths["Synergi File"])
---> 32 table_list = mdb.list_tables(self.paths["Synergi File"])
     34 table_list_warehouse = []
     35 if "warehouse" in self.paths:

File ~/ditto/ditto/readers/synergi/pandas_access.py:43, in list_tables(rdb_file, encoding)
     39     tables = subprocess.check_output(
     40         [os.path.join(path_to_mdbtools_win, "mdb-tables.exe"), rdb_file]
     41     ).decode(encoding)
     42 else:
---> 43     tables = subprocess.check_output(
     44         [os.path.join(path_to_mdbtools, "mdb-tables"), rdb_file]
     45     ).decode(encoding)
     46 return tables.strip().split(" ")

File /usr/lib/python3.10/subprocess.py:421, in check_output(timeout, *popenargs, **kwargs)
    418         empty = b''
    419     kwargs['input'] = empty
--> 421 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    422            **kwargs).stdout

File /usr/lib/python3.10/subprocess.py:526, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
    524     retcode = process.poll()
    525     if check and retcode:
--> 526         raise CalledProcessError(retcode, process.args,
    527                                  output=stdout, stderr=stderr)
    528 return CompletedProcess(process.args, retcode, stdout, stderr)

CalledProcessError: Command '['/home/shared_user/ditto/ditto/readers/synergi/mdbtools/bin/mdb-tables', 'input.mdb']' returned non-zero exit status 127.

Have attempted to force installation of libmdb2 but library no longer exists. Options through apt-get are libdmb3 and mdbtools

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions