Issue 4: MemoryError on Mac OS X
Status:  Complete
Owner:
Closed:  Nov 2008
Reported by squishywaffle@gmail.com, Nov 19, 2008
When trying to iterate through the results of a query, I'm getting a
MemoryError on Mac OS 10.4. The same exact code runs on Linux using a
similar ODBC stack. They're both using iODBC with the latest pyodbc
connecting to the same server.

connection = pyodbc.connect(settings.ETOOLS_ODBC_DSN)
cursor = connection.cursor()
cursor.execute("SELECT TOP 5 * FROM tb_FSAR_Data_SampArtReq WHERE Job_ID =
49297")
    for ejob in results: 
        job = Job()
Nov 20, 2008
Project Member #1 mkleehammer
Thanks for the report.  It's a little hard to say what it could be from this, but
fortunately a good friend is just starting a project using OS/X 10.5.  (We haven't
seen any problems yet, but it will help me find your issue.)

Let's start by gathering some quick info:

What version of pyodbc are you using?  You can use pyodbc.version.  I highly
recommend the 2.1.x branch from github -- there are specific fixes for OS/X that the
SourceForge source does not have.

What database/driver are you connecting to?  Perhaps I can build something equivalent
for testing?

Finally, can you print cursor.description so I can see the columns?  Perhaps it is
related to particular data types or lengths.

You might try select 1 or 2 columns to see if everything fails or if there is some
limit we're hitting.

Status: Accepted
Nov 20, 2008
Project Member #2 mkleehammer
(No comment was entered for this change.)
Owner: mkleehammer
Nov 21, 2008
#3 squishywaffle@gmail.com
It looks like the most recent version in github solves this problem.

For reference, though:
Mac OS 10.5
Python 2.5.2
Actual ODBC Driver + iODBC
MS SQL
Nov 21, 2008
Project Member #4 mkleehammer
(No comment was entered for this change.)
Status: Done
Nov 21, 2010
Project Member #5 mkleehammer
(No comment was entered for this change.)
Status: Complete