18F / rdbms-subsetter

Generates a subset of a relational database that respects foreign key constraints
Creative Commons Zero v1.0 Universal
313 stars 30 forks source link

ImportError while running rdbms-subsetter #40

Open POOJA-BFRS01535 opened 6 years ago

POOJA-BFRS01535 commented 6 years ago

Getting import error trying to run the most basic command.

Traceback (most recent call last):
  File "/usr/local/bin/rdbms-subsetter", line 7, in <module>
    from subsetter import generate
  File "/usr/local/lib/python2.7/dist-packages/subsetter.py", line 75, in <module>
    from dialects.postgres import fix_postgres_array_of_enum
ImportError: No module named dialects.postgres
sebboh commented 6 years ago

It looks like the project is not being actively maintained, but for anyone else that comes across this error I found a workaround to get this running. I'm not a python dev so maybe I missed something, but for whatever reason pip does not seem to install all of the project files. You need to copy the dialects folder of this project to your python site-packages folder. For me, this meant cloning the repository and linking dialects to /usr/local/lib/python2.7/site-packages