Error in mssql.py, do_commit not found

Issue #471 resolved
Former user created an issue

I've upgraded SA from 0.3.1 to 0.3.4 with no other changes. Running my program against my SQLServer 2000 database now I get:

cl = globals.cq.get_by(**sdict)

File "build\bdist.win32\egg\sqlalchemy\orm\query.py", line 93, in get_by File "build\bdist.win32\egg\sqlalchemy\orm\query.py", line 252, in select_whereclause File "build\bdist.win32\egg\sqlalchemy\orm\query.py", line 378, in _select_statement File "build\bdist.win32\egg\sqlalchemy\orm\query.py", line 308, in execute File "build\bdist.win32\egg\sqlalchemy\orm\session.py", line 133, in execute File "build\bdist.win32\egg\sqlalchemy\orm\session.py", line 124, in connection File "build\bdist.win32\egg\sqlalchemy\orm\session.py", line 32, in connection File "build\bdist.win32\egg\sqlalchemy\orm\session.py", line 48, in get_or_add File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 220, in begin File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 211, in _create_transaction File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 379, in init File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 228, in _begin_impl File "build\bdist.win32\egg\sqlalchemy\databases\mssql.py", line 471, in do_begin NameError: global name 'do_commit' is not defined

This occurs in everything I try to get from the database. I looked in the mssql.py file and can see where the problem is, but I'm not sure quite what the fix is. It seems that there is both a function and a variable called do_commit. The variable does indeed not appear to be global at the point of this error.

I can't easily make a standalone test case for this. I think the error is obvious when looking at the code, but I don't know what the "right" fix is. I will attempt to make a small test case if you can't find the problem, but it may take a while.

Thanks, Gary.

Comments (2)

  1. Former user Account Deleted

    My apologies, I noticed that this was fixed in trunk yesterday as part of an unrelated ticket. I've updated to svn trunk and it works OK now.

    Thanks, Gary.

  2. Log in to comment