On 20 Nov 2013, at 15:56, Michael Bayer <mike...@zzzcomputing.com> wrote:
> > On Nov 20, 2013, at 9:39 AM, Ed Singleton <singleto...@gmail.com> wrote: > >> I'm getting a Memory error when trying to get data from my database. It >> happens during a process that loads fixture data into the database, but the >> error always happens at the same point on a line that fetches a single >> record from the db. >> >> Essentially the line does `item = session.query(my_class).get(['ccp', >> 'en'])`. The table only has around 10 rows in it. The code works fine with >> sqlite. >> >> I'm not entirely sure what MemoryError means, but I put a bit of logging in >> the app and `session.identity_map` only contains 32 items, and >> `gc.get_objects()` has a length of 300,000, which doesn't seem unreasonable. >> >> I'm running Python 2.6 on a Mac (10.8) and the SQL Server is running on a >> Windows 7 VM, with freetds and unixodbc in-between them. >> >> I'd really like some advice on how to debug this as I'm not at all sure. > > I’m assuming you’re using pyodbc. I’ve never been able to get unixodbc to > work on OSX with pyodbc, OSX uses iODBC by default and pyodbc works better in > that case. Even with the latest Pyodbc, I get lots of errors like this on > OSX with FreeTDS 0.91 and iODBC and there’s no sign of them being fixed, so > for OSX I’d stick with iODBC + FreeTDS 0.86. Sorry, yes, I should have said I'm using pyodbc. I tried using iODBC, but I couldn't get iodbctest to recognise my DSNs, so I used unixodbc as it 'just worked'. I'll give it another go, and I might try setting up a second VM running Linux to run my tests off. I've had no problems with linux and unixodbc. Thanks Ed -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.