Python error: missing 'mdb-schema' when using python_access package

1.6k views Asked by At

Running on Ubuntu 16.04, Python 3.6.2

I have successfully used this package before. In fact, it works on a different pc but not the one I need it to work on. https://pypi.python.org/pypi/pandas_access

import pandas_access as mdb
df = mdb.read_table("myDatabase", "myTable")

Traceback (most recent call last):

File "", line 1, in

File "/home/nfw/anaconda3/lib/python3.6/site-packages/pandas_access/init.py", line 118, in read_table schemas = to_pandas_schema(read_schema(rdb_file, schema_encoding),

File "/home/nfw/anaconda3/lib/python3.6/site-packages/pandas_access/init.py", line 59, in read_schema output = subprocess.check_output(['mdb-schema', rdb_file])

File "/home/nfw/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout

File "/home/nfw/anaconda3/lib/python3.6/subprocess.py", line 403, in run with Popen(*popenargs, **kwargs) as process:

File "/home/nfw/anaconda3/lib/python3.6/subprocess.py", line 707, in init restore_signals, start_new_session)

File "/home/nfw/anaconda3/lib/python3.6/subprocess.py", line 1333, in _execute_child raise child_exception_type(errno_num, err_msg)

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

The code for pandas_access is available here

https://github.com/jbn/pandas_access/blob/master/pandas_access/init.py

It's supposed to only require MDB Tools which I have installed and it works. I can open the access database using MDB Tools on its own.

1

There are 1 answers

0
BaconSandwich On

Solved!

I ran mdb-schema on the command line of the working pc and got:

Usage: mdb-schema [options] [] where options are: -T Only create schema for named table -N Prefix identifiers with namespace

I rant mdb-schema on the non-working pc and got: The program 'mdb-schema' is currently not installed. You can install it by typing: sudo apt install mdbtools

Not sure how I this wasn't installed as I was running gmdb2 on it for sure before this but oh well, need to move on.