Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

res2sqlite #23

Closed
lawrencerenna opened this issue Apr 2, 2019 · 3 comments
Closed

res2sqlite #23

lawrencerenna opened this issue Apr 2, 2019 · 3 comments
Assignees
Labels

Comments

@lawrencerenna
Copy link

Here is my code:

`from galvani import res2sqlite as r2s

Input_file = 'C012.res'
Output_file = 'new'

r2s.convert_arbin_to_sqlite(Input_file, Output_file)`

Here is the output:

Reading Version_Table...
Error while importing Version_Table

Traceback (most recent call last):
File "/pithy/code/arbin_import_test.py", line 19, in
r2s.convert_arbin_to_sqlite(Input_file, Output_file)
File "/usr/local/lib/python2.7/dist-packages/galvani/res2sqlite.py", line 417, in convert_arbin_to_sqlite
mdb_get_data(s3db, input_file, table)
File "/usr/local/lib/python2.7/dist-packages/galvani/res2sqlite.py", line 397, in mdb_get_data
mdb_get_data_text(s3db, filename, table)
File "/usr/local/lib/python2.7/dist-packages/galvani/res2sqlite.py", line 373, in mdb_get_data_text
mdb_sql.terminate()
UnboundLocalError: local variable 'mdb_sql' referenced before assignment

Can you help me with this error?

Thank you

@chatcannon chatcannon added the bug label Apr 2, 2019
@chatcannon chatcannon self-assigned this Apr 2, 2019
@chatcannon
Copy link
Collaborator

Ah, that was silly of me - you see what happens when I refactor without having test coverage...

chatcannon added a commit that referenced this issue Apr 2, 2019
@chatcannon
Copy link
Collaborator

Actually it's not quite so silly as all that, it's just that the mdbtools package is not found and the code dealing with the errors isn't prepared to deal with that eventuality

chatcannon added a commit that referenced this issue Apr 2, 2019
@lawrencerenna
Copy link
Author

Works great now. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants