jepegit / cellpy

extract and tweak data from electrochemical tests of cells
MIT License
88 stars 30 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'mdb-export' #226

Closed kevinsmia1939 closed 2 years ago

kevinsmia1939 commented 2 years ago

Describe the bug Hi,

I want to test out cellpy, so I tried running the example file. I am uncertain what is mdb-export, maria db?

To Reproduce

git clone --recursive git@github.com:jepegit/cellpy.git
python3 -mpip install cellpy

open simple_reader_cellpy.py with Spyder 5.3.3. Click run

still alive so I guess all the needed modules are installed
/home/andy/Desktop/software/cellpy/examples

 -----------------------------------your files-----------------------------------
../testdata/data/20160805_test001_45_cc_01.res OK
../testdata/data/20160805_test001_45_cc_02.res OK
--------------------------------------------------------------------------------
Traceback (most recent call last):

  File /usr/lib/python3.10/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File ~/Desktop/software/cellpy/examples/simple_reader_cellpy.py:45
    d = cellreader.CellpyData().from_raw(rawfiles)

  File ~/.local/lib/python3.10/site-packages/cellpy/readers/cellreader.py:1221 in from_raw
    new_cells = raw_file_loader(

  File ~/.local/lib/python3.10/site-packages/cellpy/readers/instruments/arbin_res.py:1128 in loader
    new_tests = self._loader_posix(

  File ~/.local/lib/python3.10/site-packages/cellpy/readers/instruments/arbin_res.py:989 in _loader_posix
    ) = self._create_tmp_files(

  File ~/.local/lib/python3.10/site-packages/cellpy/readers/instruments/arbin_res.py:1182 in _create_tmp_files
    subprocess.call([sub_process_path, temp_filename, table_name], stdout=f)

  File /usr/lib64/python3.10/subprocess.py:345 in call
    with Popen(*popenargs, **kwargs) as p:

  File /usr/lib64/python3.10/subprocess.py:971 in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,

  File /usr/lib64/python3.10/subprocess.py:1847 in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'mdb-export'

Thank you.

jepegit commented 2 years ago

Hi,

Thanks for spotting this.

This is probably due to missing mdbtools. It's only needed for Arbin files (.res) on posix. I searched the cellpy documentation, but didn't find anything about the need for mdbtools - I probably have forgotten to write about it.

We should update both the documentation and the check so that this issue gets solved.

I can have a look at it tomorrow (I am at a conference now)

kevinsmia1939 commented 2 years ago

Fixed it by installing mdbtools.

jepegit commented 2 years ago

Excellent!