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. Thanks Ed Traceback (most recent call last): File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/nose/loader.py", line 390, in loadTestsFromName addr.filename, addr.module) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Users/singletoned/src/newman/newman-mail/tests/test_facade.py", line 82, in <module> loader(static_fixture).add_data() File "/Users/singletoned/src/newman/newman-schema/lib/newman/schema/fixture.py", line 577, in add_data item = _get_from_data(entity_class, session, item_data) File "/Users/singletoned/src/newman/newman-schema/lib/newman/schema/fixture.py", line 39, in _get_from_data item = session.query(cls).get(p_key) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 820, in get return loading.load_on_ident(self, key) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/orm/loading.py", line 226, in load_on_ident return q.one() File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 2310, in one ret = list(self) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/orm/loading.py", line 65, in instances fetch = cursor.fetchall() File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/engine/result.py", line 752, in fetchall self.cursor, self.context) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1027, in _handle_dbapi_exception util.reraise(*exc_info) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/engine/result.py", line 746, in fetchall l = self.process_rows(self._fetchall_impl()) File "/Users/singletoned/.envs/newman-crm/lib/python2.6/site-packages/sqlalchemy/engine/result.py", line 713, in _fetchall_impl return self.cursor.fetchall() MemoryError -- 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.