-
Notifications
You must be signed in to change notification settings - Fork 30
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
Receiving sqlite3.OperationalError when running res2sqlite.py #47
Comments
My guess is that you have a newer version of the Arbin software which adds additional data columns to the .res file. It's been a long time since I had access to a battery cycler myself so I'm reliant on users to keep me updated with newer versions of the file format. |
@nhshetty-99 Do you have a |
Hi, Chris, I do have an example of a .res file that I can provide you. I have attached a zip file of it to this post, and I used it to write in the new columns to two of the tables in my local copy of
I added the above columns to the I also had to include the following (column, type) pairs:
I added these ones to the Please let me know if adding these columns to |
@nhshetty-99 thanks for sending the file, and sorry for taking to long to get back to you on this. The changes you suggested do indeed fix the problem of trying to put too much data into the existing tables and I have added a fix for that in https://github.com/chatcannon/galvani/tree/arbin-5-26 I will also look in more detail at the file you sent me to see if there are any additional tables that need to be imported. |
@nhshetty-99 Would it be OK if I added the file you submitted to the (publicly available) test data for this project? |
Hi, Chris, Thank you so much for looking into this issue. I will check out the link you provided in your previous comment. There were also one or two more problems I was facing with the galvani module, so I will look into those a bit more and get back to you. As for the test file I provided you, I'll check with my research professor first and get back to you on that as well. |
Hi, Chris, I talked to my research professor and coordinators, and they are okay with you using the example file I sent you for test data. I don't believe that file has any protected data, so it should be fine for usage. Additionally, my research coordinators were not able to get the uploaded version of galvani with all the recent merge requests when running pip install galvani in their virtual environments. We believe this is the case because the most recent release (0.1.0) for galvani was done back in June (I think). Is there a way we can use a forked version of this galvani module and use pip install on that? Will I need to submit my own releases in my forked in order for that to happen? Thanks again for the help. |
@nhshetty-99 FYI I just released version 0.2.0 which includes these changes and should now be available for download with |
I am trying to parse a .res file for a project with the
convert_arbin_to_sqlite()
function in res2sqlite.py; however, I keep receiving ansqlite3.OperationalError
.This is the code snippet I am trying to run:
res.convert_arbin_to_sqlite(infilepath, outfilepath) # outfilepath is a .s3db file
connection = sqlite3.connect(outfilepath)
cursor = connection.execute('SELECT * FROM Global_Table')
data = cursor.fetchall()
However, after trying to run this, I keep receiving the following error message:
sqlite3.OperationalError: table Global_Table has no column named Log_Can_BMS_Data_Flag
I checked the res2sqlite.py source code, specifically the part where the
Global_Table
is created (starting from Line 37), and I notice that there are several columns, the first one beingLog_Can_BMS_Data_Flag
, which seem to be read in by my .res file but aren't present in the res2sqlite.py source code during theGlobal_Table
creation process.Has anyone received this kind of error before, and if so, can I please receive some assistance on it? Thanks!
The text was updated successfully, but these errors were encountered: