Spam detection software, running on the system "morningsun.geekisp.com", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of this system for details.
Content preview: Hi, I'm getting an error when attempting to setup the
tables that I will be using for query formulation. I checked out
SQLAlchemy from SVN trunk this morning, so it's the latest development
version. The code I am running exists in conf/__init__.py and I am
simply calling it like so: [...]
Content analysis details: (4.3 points, 2.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 HTML_MESSAGE BODY: HTML included in message
0.9 HTML_10_20 BODY: Message is 10% to 20% HTML
3.3 URIBL_AB_SURBL Contains an URL listed in the AB SURBL blocklist
[URIs: techsay.com]
0.0 UPPERCASE_25_50 message body is 25-50% uppercase
The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam. If you wish to view
it, it may be safer to save it to a file and open it with an editor.
Date: September 26, 2006 2:23:32 AM EDT
Subject: [Sqlalchemy-users] MS SQL - sqlalchemy.exceptions.InvalidRequestError: This connection still has 1 open cursors
Hi, I'm getting an error when attempting to setup the tables that I will be using for query formulation. I checked out SQLAlchemy from SVN trunk this morning, so it's the latest development version.
The code I am running exists in conf/__init__.py and I am simply calling it like so:
<!-- ~/Documents/DataProc/Development/pharmat_email tbrannon --> python
Python 2.4.2 (#1, Sep 14 2006, 05:23:55)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import conf
>>> sa = conf.sqlalchemy()
DEBUG:root:Engine <sqlalchemy.engine.base.ComposedSQLEngine object at 0x147d870>
2006-09-26 02:10:01,124 INFO sqlalchemy.pool.QueuePool.0x147d610 Created new connection <pymssql.pymssqlCnx instance at 0x1494a58>
INFO:sqlalchemy.pool.QueuePool.0x147d610:Created new connection <pymssql.pymssqlCnx instance at 0x1494a58>
2006-09-26 02:10:01,124 INFO sqlalchemy.pool.QueuePool.0x147d610 Connection <pymssql.pymssqlCnx instance at 0x1494a58> checked out from pool
INFO:sqlalchemy.pool.QueuePool.0x147d610:Connection <pymssql.pymssqlCnx instance at 0x1494a58> checked out from pool
2006-09-26 02:10:01,137 INFO sqlalchemy.engine.base.ComposedSQLEngine.0x147d870 SELECT [COLUMNS_cb46].[TABLE_SCHEMA], [COLUMNS_cb46].[TABLE_NAME], [COLUMNS_cb46].[COLUMN_NAME], [COLUMNS_cb46].[IS_NULLABLE], [COLUMNS_cb46].[DATA_TYPE], [COLUMNS_cb46].[ORDINAL_POSITION], [COLUMNS_cb46].[CHARACTER_MAXIMUM_LENGTH], [COLUMNS_cb46].[NUMERIC_PRECISION], [COLUMNS_cb46].[NUMERIC_SCALE], [COLUMNS_cb46].[COLUMN_DEFAULT]
FROM [INFORMATION_SCHEMA].[COLUMNS] AS [COLUMNS_cb46]
WHERE [COLUMNS_cb46].[TABLE_NAME] = %(COLUMNS_TABLE_NAME)s AND [COLUMNS_cb46].[TABLE_SCHEMA] = %(COLUMNS_TABLE_SCHEMA)s ORDER BY [COLUMNS_cb46].[ORDINAL_POSITION]
INFO:sqlalchemy.engine.base.ComposedSQLEngine.0x147d870:SELECT [COLUMNS_cb46].[TABLE_SCHEMA], [COLUMNS_cb46].[TABLE_NAME], [COLUMNS_cb46].[COLUMN_NAME], [COLUMNS_cb46].[IS_NULLABLE], [COLUMNS_cb46].[DATA_TYPE], [COLUMNS_cb46].[ORDINAL_POSITION], [COLUMNS_cb46].[CHARACTER_MAXIMUM_LENGTH], [COLUMNS_cb46].[NUMERIC_PRECISION], [COLUMNS_cb46].[NUMERIC_SCALE], [COLUMNS_cb46].[COLUMN_DEFAULT]
FROM [INFORMATION_SCHEMA].[COLUMNS] AS [COLUMNS_cb46]
WHERE [COLUMNS_cb46].[TABLE_NAME] = %(COLUMNS_TABLE_NAME)s AND [COLUMNS_cb46].[TABLE_SCHEMA] = %(COLUMNS_TABLE_SCHEMA)s ORDER BY [COLUMNS_cb46].[ORDINAL_POSITION]
2006-09-26 02:10:01,151 INFO sqlalchemy.engine.base.ComposedSQLEngine.0x147d870 {'COLUMNS_TABLE_NAME': 'Users', 'COLUMNS_TABLE_SCHEMA': 'dbo'}
INFO:sqlalchemy.engine.base.ComposedSQLEngine.0x147d870:{'COLUMNS_TABLE_NAME ': 'Users', 'COLUMNS_TABLE_SCHEMA': 'dbo'}
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "conf/__init__.py", line 34, in __init__
self.table = tables(self.metadata )
File "conf/__init__.py", line 38, in __init__
self.users = Table('Users', metadata, autoload=True)
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/schema.py", line 138, in __call__
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/engine/base.py", line 498, in reflecttable
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/engine/base.py", line 232, in close
File "build/bdist.darwin- 8.7.1-i386/egg/sqlalchemy/pool.py", line 205, in close
File "build/bdist.darwin-8.7.1-i386/egg/sqlalchemy/pool.py", line 210, in _close
sqlalchemy.exceptions.InvalidRequestError: This connection still has 1 open cursors
>>>
=================== here's the source code ==============================
import pymssql
from sqlalchemy import *
from logging import *
basicConfig(level=DEBUG)
class sqlalchemy:
def __init__(self):
self.engine = create_engine("mssql://pl:[EMAIL PROTECTED]:433/Phmr", echo=True)
self.metadata = BoundMetaData(self.engine)
debug("Engine %s" % self.engine)
self.table = tables(self.metadata)
class tables:
def __init__(self, metadata):
self.users = Table('Users', metadata, autoload=True) #### SA dies on this line
self.user_searches = Table('UserSearches', metadata, autoload=True)
self.customers = Table('Customers', metadata, autoload=True)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Sqlalchemy-users mailing list