Memory error when connecting to a .sql file in Grasshopper

Hi,

I am having trouble using sqllite in Grasshopper, and I wonder if anyone might know what the issue is?


When trying to get a connection to a .sql file, I get the error:

Error: Runtime error (OutOfMemoryException): Insufficient memory to continue the execution of the program.

So for instance, this following script:

import sqlite3

sql_file = "/Users/em/Desktop/test_sql/eplusout.sql"
conn = sqlite3.connect(sql_file)
try:
    c = conn.cursor()
    c.execute(
        "SELECT Name, IndexGroup, Units, ReportingFrequency "
        "FROM ReportDataDictionary"
    )
    outputs = c.fetchall()
    for _ in outputs:
        print(_)
    conn.close()
except Exception as e:
    conn.close()
    raise Exception(str(e))

will give the above Memory error. However, if I run the exact same script, on the exact same .sql file, but outside of Grasshopper, it all runs fine:

The .sql file in this case is only 2.4 MB, and so it seems hard to believe it is an actual memory capacity issue? Can anyone suggest a solution or identify where this is going wrong?

I do not have a lot of experience working with .sql files, so it is very possible I am doing something entirely wrong here?

Attached are the sample script, gh-file, and .sql file for reference. Any thoughts or suggestions are much appreciated. I believe that this may be the cause of a common error which is occurring in the Ladybug/Honeybee plugin as well?

Archive.zip (896.6 KB)

Environment:

  • Apple M1 (ARM)
  • MacOS Sonoma 14.6.1
  • Rhino v8 (8.11.24254.15002, 2024-09-10)

thank you for any suggestions!
@ed.p.may