Closed clueboy closed 11 years ago
From akukula on April 22, 2010 00:51:35
Can't confirm this either with ActivePython 2.6.4.10 or with python.org Python 2.6.5. Please try to reinstall Python and pymssql and see what happens.
Status: Started
Owner: akukula
Labels: OpSys-Windows Usability
From cewgsm@comcast.net on April 26, 2010 11:51:51
I was using pymssql last night, been using it for a couple of weeks with no problem. Suddenly, when I would try to import pymssql module, it would crash PythonWin or IDLE (the Python GUI). At first it was random, about every 3rd or 4th load would crash it. Pretty soon, it was every import. The only other program running during this time was Notepad++.
Let me emphasize that this has been working flawlessly for 2 weeks; crashes at first were random; finally, crashed every time I tried to import pymssql. This occurred over about a 2 hour time period.
Tried uninstalling pymssql and reinstalling. Still crashes on every import.
Running in VMWare 1.0.9 build-156507 Windows 7 Professional 32-bit Python 2.6.2 ( r262 :71605, Apr 14 2009, 22:40:02) [Installed by ESRI's ArcGIS program, in C:\Python26\ArcGIS9.4... -- this program apparently wants this folder structure, I don't know why, but I don't want to change it.]
Detailed crash info: Problem signature: Problem Event Name: APPCRASH Application Name: pythonw.exe Application Version: 0.0.0.0 Application Timestamp: 49e4f60b Fault Module Name: _mssql.pyd Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4bc64492 Exception Code: c0000005 Exception Offset: 00017495 OS Version: 6.1.7600.2.0.0.256.48 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
I've confirmed that this crash info is the same on every crash; it doesn't change. I've tried rebooting Virtual Machine, etc., but it seems "corrupted".
Just tried uninstalling pymssql and PythonWin, reinstalled just pymssql - same crash info.
Hope this helps in tracking this down.
From akukula on April 26, 2010 14:08:58
OK so the python language works just fine, but the IDEs crash. Can you try just
import _mssql
from IDE or Pythonwin?
From cewgsm@comcast.net on April 26, 2010 20:30:42
Just tried that and it worked!
From ryepup on April 27, 2010 07:20:07
I see this as well, running on windows 7. I installed a new version of pymssql using the pymssql-1.9.907.win32-py2.6.exe installer the morning of 4/27/2010.
C:\Python26>python.exe "C:\Python26\scripts\ipython" Python 2.6.5 ( r265 :79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import pymssql tds_init_winsock: WSAEnumProtocols failed with 10055(WSAENOBUFS: No buffer space
C:\Python26>python.exe -i Python 2.6.5 ( r265 :79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import _mssql tds_init_winsock: WSAEnumProtocols failed with 10055(WSAENOBUFS: No buffer space
available.)
/cygdrive/c/Python26/python.exe -i Python 2.6.5 ( r265 :79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. Could not open PYTHONSTARTUP IOError: [Errno 2] No such file or directory: '/home/ryepup/.pythonrc'
import pymssql
exit()
From ryepup on April 27, 2010 08:18:39
A coworker using Python 2.6.2 ( r262 :71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] has no problem importing pymssql under ipython.
From akukula on April 27, 2010 10:30:38
So looks like we have problem with FreeTDS on Windows. Stay tuned for updates.
From nmeixler on April 27, 2010 16:32:37
I tried importing _mssql as well. Still Crashes. The error message contains this info (not sure if any of it is useful)
Error Signature: AppName pythonw.exe AppVer 0.0.0.0 ModName: _mssql.pyd ModVer: 0.0.0.0 Offset 00017495
Exception Information: Code: 0xc0000005 Flags: 0x00000000 Record: 0x0000000000000000 Adress0x0000000001557495
Let me know if there is any more info I can provide. Thanks to all for the help.
From luigi88s on April 30, 2010 15:13:39
I am having the same issue with the _mssql library. Everything works fine if I comment out 'import cgi' but I need it.
From eavesdown on May 01, 2010 13:13:44
I am experiencing the exact same issue on both a Windows XP SP3 and a Windows Server 2008 SP2 machine. Both are running Python 2.6.5, and trying to import either pymssql or _mssql whether via CGI or IDLE immediately crashes the python process.
From r.bryan.kane on May 05, 2010 11:48:59
I find the problem not only crashing the IDE but also when running a script from the command line. The 2nd line of the script is "import pymssql".
Attached is a screenshot of the output from the command line
Attachment: pymssql_crash.JPG
From kylinpoet on May 05, 2010 23:27:15
i had the same problem with Comment 11 by r.bryan.kane,
From yangwenchong2003 on May 21, 2010 00:27:20
I had same problem using sqlobject but in CMD is OK
Attachment: 未命名.jpg
From yangwenchong2003 on May 21, 2010 00:28:18
from sqlobject.dbconnection import DBAPI from sqlobject import col import re import pymssql as sqlmodule class MSSQLConnection(DBAPI):
supportTransactions = True
dbName = 'mssql'
schemes = [dbName]
def __init__(self, db, user, password='', host='localhost',
autoCommit=0, **kw):
backends = kw.pop('backend', None) or 'adodb,pymssql'
for backend in backends.split(','):
backend = backend.strip()
if not backend:
continue
try:
if backend in ('adodb', 'adodbapi'):
import adodbapi as sqlmodule
elif backend == 'pymssql':
pass
#import pymssql
#import pymssql as sqlmodule
else:
raise ValueError('Unknown MSSQL backend "%s", expected adodb or
pymssql' % backend) except ImportError: pass else: break else: raise ImportError('Cannot find an MSSQL backend, tried %s' % backends) self.module = sqlmodule
if sqlmodule.__name__ == 'adodbapi':
self.dbconnection = sqlmodule.connect
# ADO uses unicode only (AFAIK)
self.usingUnicodeStrings = True
# Need to use SQLNCLI provider for SQL Server Express Edition
if kw.get("ncli"):
conn_str = "Provider=SQLNCLI;"
else:
conn_str = "Provider=SQLOLEDB;"
conn_str += "Data Source=%s;Initial Catalog=%s;"
# MSDE does not allow SQL server login
if kw.get("sspi"):
conn_str += "Integrated Security=SSPI;Persist Security Info=False"
self.make_conn_str = lambda keys: [conn_str % (keys.host, keys.db)]
else:
conn_str += "User Id=%s;Password=%s"
self.make_conn_str = lambda keys: [conn_str % (keys.host, keys.db,
keys.user, keys.password)]
kw.pop("sspi", None)
kw.pop("ncli", None)
else: # pymssql
self.dbconnection = sqlmodule.connect
sqlmodule.Binary = lambda st: str(st)
# don't know whether pymssql uses unicode
self.usingUnicodeStrings = False
self.make_conn_str = lambda keys: \
["", keys.user, keys.password, keys.host, keys.db]
self.autoCommit=int(autoCommit)
self.host = host
self.db = db
self.user = user
self.password = password
self.limit_re = re.compile('^\s*(select )(.*)', re.IGNORECASE)
self.password = password
self._can_use_max_types = None
DBAPI.__init__(self, **kw)
def connectionFromURI(cls, uri):
user, password, host, port, path, args = cls._parseURI(uri)
path = path.strip('/')
return cls(user=user, password=password, host=host or 'localhost',
db=path, **args)
connectionFromURI = classmethod(connectionFromURI)
def insert_id(self, conn):
"""
insert_id method.
"""
c = conn.cursor()
# converting the identity to an int is ugly, but it gets returned
# as a decimal otherwise :S
c.execute('SELECT CONVERT(INT, @@IDENTITY)')
return c.fetchone()[0]
def makeConnection(self):
con = self.dbconnection( *self.make_conn_str(self) )
cur = con.cursor()
cur.execute('SET ANSI_NULLS ON')
cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))")
self.decimalSeparator = str(cur.fetchone()[0])[-3]
cur.close()
return con
HAS_IDENTITY = """
SELECT col.name, col.status, obj.name
FROM syscolumns col
JOIN sysobjects obj
ON obj.id = col.id
WHERE obj.name = '%s'
and col.autoval is not null
"""
def _hasIdentity(self, conn, table):
query = self.HAS_IDENTITY % table
c = conn.cursor()
c.execute(query)
r = c.fetchone()
return r is not None
def _queryInsertID(self, conn, soInstance, id, names, values):
"""
Insert the Initial with names and values, using id.
"""
table = soInstance.sqlmeta.table
idName = soInstance.sqlmeta.idName
c = conn.cursor()
has_identity = self._hasIdentity(conn, table)
if id is not None:
names = [idName] + names
values = [id] + values
elif has_identity and idName in names:
try:
i = names.index( idName )
if i:
del names[i]
del values[i]
except ValueError:
pass
if has_identity:
if id is not None:
c.execute('SET IDENTITY_INSERT %s ON' % table)
else:
c.execute('SET IDENTITY_INSERT %s OFF' % table)
q = self._insertSQL(table, names, values)
if self.debug:
print 'QueryIns: %s' % q
c.execute(q)
if has_identity:
c.execute('SET IDENTITY_INSERT %s OFF' % table)
if id is None:
id = self.insert_id(conn)
if self.debugOutput:
self.printDebug(conn, id, 'QueryIns', 'result')
return id
def _queryAddLimitOffset(cls, query, start, end):
if end and not start:
limit_str = "SELECT TOP %i" % end
match = cls.limit_re.match(query)
if match and len(match.groups()) == 2:
return ' '.join([limit_str, match.group(2)])
else:
return query
_queryAddLimitOffset = classmethod(_queryAddLimitOffset)
def createReferenceConstraint(self, soClass, col):
return col.mssqlCreateReferenceConstraint()
def createColumn(self, soClass, col):
return col.mssqlCreateSQL(self)
def createIDColumn(self, soClass):
key_type = {int: "INT", str: "TEXT"}[soClass.sqlmeta.idType]
return '%s %s IDENTITY UNIQUE' % (soClass.sqlmeta.idName, key_type)
def createIndexSQL(self, soClass, index):
return index.mssqlCreateIndexSQL(soClass)
def joinSQLType(self, join):
return 'INT NOT NULL'
SHOW_TABLES="SELECT name FROM sysobjects WHERE type='U'"
def tableExists(self, tableName):
for (table,) in self.queryAll(self.SHOW_TABLES):
if table.lower() == tableName.lower():
return True
return False
def addColumn(self, tableName, column):
self.query('ALTER TABLE %s ADD %s' %
(tableName,
column.mssqlCreateSQL(self)))
def delColumn(self, sqlmeta, column):
self.query('ALTER TABLE %s DROP COLUMN %s'...
From yangwenchong2003 on May 21, 2010 00:28:18
... % (tableName.table, column.dbName))
# precision and scale is gotten from column table so that we can create
# decimal columns if needed
SHOW_COLUMNS = """
select
name,
length,
( select name
from systypes
where cast(xusertype as int)= cast(sc.xtype as int)
) datatype,
prec,
scale,
isnullable,
cdefault,
m.text default_text,
isnull(len(autoval),0) is_identity
from syscolumns sc
LEFT OUTER JOIN syscomments m on sc.cdefault = m.id
AND m.colid = 1
where
sc.id in (select id
from sysobjects
where name = '%s')
order by
colorder"""
def columnsFromSchema(self, tableName, soClass):
colData = self.queryAll(self.SHOW_COLUMNS
% tableName)
results = []
for field, size, t, precision, scale, nullAllowed, default, defaultText,
is_identity in colData: if field == soClass.sqlmeta.idName: continue
colClass, kw = self.guessClass(t, size, precision, scale)
kw['name'] = str(soClass.sqlmeta.style.dbColumnToPythonAttr(field))
kw['dbName'] = str(field)
kw['notNone'] = not nullAllowed
if (defaultText):
# Strip ( and )
defaultText = defaultText[1:-1]
if defaultText[0] == "'":
defaultText = defaultText[1:-1]
else:
if t == "int" : defaultText = int(defaultText)
if t == "float" : defaultText = float(defaultText)
if t == "numeric": defaultText = float(defaultText)
# TODO need to access the "column" to_python method here--but the
object doesn't exists yet
# @@ skip key...
kw['default'] = defaultText
results.append(colClass(**kw))
return results
def _setAutoCommit(self, conn, auto):
#raise Exception(repr(auto))
return
#conn.auto_commit = auto
option = "ON"
if auto == 0:
option = "OFF"
c = conn.cursor()
c.execute("SET AUTOCOMMIT " + option)
conn.setconnectoption(SQL.AUTOCOMMIT, option)
# precision and scale is needed for decimal columns
def guessClass(self, t, size, precision, scale):
"""
Here we take raw values coming out of syscolumns and map to SQLObject
class types. """ if t.startswith('int'): return col.IntCol, {} elif t.startswith('varchar'): if self.usingUnicodeStrings: return col.UnicodeCol, {'length': size} return col.StringCol, {'length': size} elif t.startswith('char'): if self.usingUnicodeStrings: return col.UnicodeCol, {'length': size, 'varchar': False} return col.StringCol, {'length': size, 'varchar': False} elif t.startswith('datetime'): return col.DateTimeCol, {} elif t.startswith('decimal'): return col.DecimalCol, {'size': precision, # be careful for awkward naming 'precision': scale} else: return col.Col, {}
def server_version(self):
try:
server_version = self.queryAll("SELECT
SERVERPROPERTY('productversion')")[0][0] server_version = server_version.split('.')[0] server_version = int(server_version) except: server_version = None # unknown self.server_version = server_version # cache it forever return server_version
def can_use_max_types(self):
if self._can_use_max_types is not None:
return self._can_use_max_types
server_version = self.server_version()
self._can_use_max_types = can_use_max_types = \
(server_version is not None) and (server_version >= 9)
return can_use_max_types
From jackie.space on May 21, 2010 01:41:51
Having the same problem here.
Windows XP SP3, Python 2.6.5 pymssql-1.9.908-py2.6
when: import web db=web.database(dbn='mssql',user='tamu',pw='tamu',db='tw_ddms',host='sql')
python 2.6 crashes with message: tds_init_winsock: WSAEnumProtocols failed with 10055(WSAENOBUFS: No buffer space available.)
From luisgarciaar on May 24, 2010 06:41:17
The same problem here, with python 2.6.5 and latest pymssql, when I try to import it, crashed python, idle or even ipython. Here you have the dump of the crash:
<?xml version="1.0" encoding="UTF-16"?>
From luisgarciaar on May 24, 2010 06:41:17
...dll" SIZE="20480" CHECKSUM="0x7D1AE27" MODULE_TYPE="WIN32" PE_CHECKSUM="0x6588" LINKER_VERSION="0x0" LINK_DATE="11/10/2008 09:40:45" UPTO_LINK_DATE="11/10/2008 09:40:45" /> <MATCHING_FILE NAME="Lib\site-packages\py2exe\run_w.exe" SIZE="17408" CHECKSUM="0x91C517D8" MODULE_TYPE="WIN32" PE_CHECKSUM="0x12F3D" LINKER_VERSION="0x0" LINK_DATE="11/10/2008 09:40:44" UPTO_LINK_DATE="11/10/2008 09:40:44" /> <MATCHING_FILE NAME="Lib\site-packages\pythonwin\mfc90.dll" SIZE="1156600" CHECKSUM="0x3B8F4E43" BIN_FILE_VERSION="9.0.21022.8" BIN_PRODUCT_VERSION="9.0.21022.8" PRODUCT_VERSION="9.00.21022.08" FILE_DESCRIPTION="MFCDLL Shared Library - Retail Version" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Visual Studio® 2008" FILE_VERSION="9.00.21022.08" ORIGINAL_FILENAME="MFC90.DLL" INTERNAL_NAME="MFC90.DLL" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x129E67" LINKER_VERSION="0x90000" UPTO_BIN_FILE_VERSION="9.0.21022.8" UPTO_BIN_PRODUCT_VERSION="9.0.21022.8" LINK_DATE="11/07/2007 06:49:58" UPTO_LINK_DATE="11/07/2007 06:49:58" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /
<MATCHING_FILE NAME="Lib\site-packages\pythonwin\mfc90u.dll" SIZE="1162744"
CHECKSUM="0xEA777280" BIN_FILE_VERSION="9.0.21022.8" BIN_PRODUCT_VERSION="9.0.21022.8" PRODUCT_VERSION="9.00.21022.08" FILE_DESCRIPTION="MFCDLL Shared Library - Retail Version" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Visual Studio® 2008" FILE_VERSION="9.00.21022.08" ORIGINAL_FILENAME="MFC90U.DLL" INTERNAL_NAME="MFC90U.DLL" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x1278D3" LINKER_VERSION="0x90000" UPTO_BIN_FILE_VERSION="9.0.21022.8" UPTO_BIN_PRODUCT_VERSION="9.0.21022.8" LINK_DATE="11/07/2007 06:50:18" UPTO_LINK_DATE="11/07/2007 06:50:18" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /> <MATCHING_FILE NAME="Lib\site-packages\pythonwin\mfcm90.dll" SIZE="59904" CHECKSUM="0xF8CC0720" BIN_FILE_VERSION="9.0.21022.8" BIN_PRODUCT_VERSION="9.0.21022.8" PRODUCT_VERSION="9.00.21022.08" FILE_DESCRIPTION="MFC Managed Library - Retail Version" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Visual Studio® 2008" FILE_VERSION="9.00.21022.08" ORIGINAL_FILENAME="MFCM90.DLL" INTERNAL_NAME="MFCM90.DLL" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x1B0A0" LINKER_VERSION="0x90000" UPTO_BIN_FILE_VERSION="9.0.21022.8" UPTO_BIN_PRODUCT_VERSION="9.0.21022.8" LINK_DATE="11/07/2007 06:51:04" UPTO_LINK_DATE="11/07/2007 06:51:04" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /> <MATCHING_FILE NAME="Lib\site-packages\pythonwin\mfcm90u.dll" SIZE="59904" CHECKSUM="0x1504521D" BIN_FILE_VERSION="9.0.21022.8" BIN_PRODUCT_VERSION="9.0.21022.8" PRODUCT_VERSION="9.00.21022.08" FILE_DESCRIPTION="MFC Managed Library - Retail Version" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Visual Studio® 2008" FILE_VERSION="9.00.21022.08" ORIGINAL_FILENAME="MFCM90U.DLL" INTERNAL_NAME="MFCM90U.DLL" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x16F4B" LINKER_VERSION="0x90000" UPTO_BIN_FILE_VERSION="9.0.21022.8" UPTO_BIN_PRODUCT_VERSION="9.0.21022.8" LINK_DATE="11/07/2007 06:51:05" UPTO_LINK_DATE="11/07/2007 06:51:05" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /> <MATCHING_FILE NAME="Lib\site-packages\pythonwin\Pythonwin.exe" SIZE="19968" CHECKSUM="0xEBEC9D45" BIN_FILE_VERSION="2.6.214.0" BIN_PRODUCT_VERSION="2.6.214.0" PRODUCT_VERSION="2.6.214.0" FILE_DESCRIPTION="" COMPANY_NAME="" PRODUCT_NAME="PyWin32" FILE_VERSION="2.6.214.0" ORIGINAL_FILENAME="Pythonwin.exe" INTERNAL_NAME="Pythonwin.exe" LEGAL_COPYRIGHT="" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x96F3" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.6.214.0" UPTO_BIN_PRODUCT_VERSION="2.6.214.0" LINK_DATE="07/05/2009 02:40:41" UPTO_LINK_DATE="07/05/2009 02:40:41" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /
<MATCHING_FILE NAME="Lib\site-packages\pythonwin\scintilla.dll" SIZE="416256"
CHECKSUM="0x918E961F" BIN_FILE_VERSION="1.7.7.0" BIN_PRODUCT_VERSION="1.7.7.0" PRODUCT_VERSION="1.77" FILE_DESCRIPTION="Scintilla.DLL - a Source Editing Component" COMPANY_NAME="Neil Hodgson neilh@scintilla.org" PRODUCT_NAME="Scintilla" FILE_VERSION="1.77" ORIGINAL_FILENAME="Scintilla.DLL" INTERNAL_NAME="Scintilla" LEGAL_COPYRIGHT="Copyright 1998-2008 by Neil Hodgson" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.7.7.0" UPTO_BIN_PRODUCT_VERSION="1.7.7.0" LINK_DATE="07/05/2009 02:41:03" UPTO_LINK_DATE="07/05/2009 02:41:03" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /
<MATCHING_FILE NAME="Lib\site-packages\pywin32_system32\pythoncom26.dll"
SIZE="354304" CHECKSUM="0xB42F350B" BIN_FILE_VERSION="2.6.214.0" BIN_PRODUCT_VERSION="2.6.214.0" PRODUCT_VERSION="2.6.214.0" FILE_DESCRIPTION="" COMPANY_NAME="" PRODUCT_NAME="PyWin32" FILE_VERSION="2.6.214.0" ORIGINAL_FILENAME="pythoncom26.dll" INTERNAL_NAME="pythoncom26.dll" LEGAL_COPYRIGHT="" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x5D1C4" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.6.214.0" UPTO_BIN_PRODUCT_VERSION="2.6.214.0" LINK_DATE="07/05/2009 02:36:42" UPTO_LINK_DATE="07/05/2009 02:36:42" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /> <MATCHING_FILE NAME="Lib\site-packages\pywin32_system32\pywintypes26.dll" SIZE="110592" CHECKSUM="0xEFC7FB2A" BIN_FILE_VERSION="2.6.214.0" BIN_PRODUCT_VERSION="2.6.214.0" PRODUCT_VERSION="2.6.214.0" FILE_DESCRIPTION="" COMPANY_NAME="" PRODUCT_NAME="PyWin32" FILE_VERSION="2.6.214.0" ORIGINAL_FILENAME="pywintypes26.dll" INTERNAL_NAME="pywintypes26.dll" LEGAL_COPYRIGHT="" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x24D09" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.6.214.0" UPTO_BIN_PRODUCT_VERSION="2.6.214.0" LINK_DATE="07/05/2009 02:35:18" UPTO_LINK_DATE="07/05/2009 02:35:18" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /> <MATCHING_FILE NAME="Lib\site-packages\win32\perfmondata.dll" SIZE="12800" CHECKSUM="0xA06FF196" BIN_FILE_VERSION="2.6.214.0" BIN_PRODUCT_VERSION="2.6.214.0" PRODUCT_VERSION="2.6.214.0" FILE_DESCRIPTION="" COMPANY_NAME="" PRO...
From luisgarciaar on May 24, 2010 06:41:17
...DUCT_NAME="PyWin32" FILE_VERSION="2.6.214.0" ORIGINAL_FILENAME="perfmondata.dll" INTERNAL_NAME="perfmondata.dll" LEGAL_COPYRIGHT="" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x5687" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.6.214.0" UPTO_BIN_PRODUCT_VERSION="2.6.214.0" LINK_DATE="07/05/2009 02:35:19" UPTO_LINK_DATE="07/05/2009 02:35:19" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /
<MATCHING_FILE NAME="Lib\site-packages\win32\pythonservice.exe" SIZE="11776"
CHECKSUM="0xE642C8FF" BIN_FILE_VERSION="2.6.214.0" BIN_PRODUCT_VERSION="2.6.214.0" PRODUCT_VERSION="2.6.214.0" FILE_DESCRIPTION="" COMPANY_NAME="" PRODUCT_NAME="PyWin32" FILE_VERSION="2.6.214.0" ORIGINAL_FILENAME="pythonservice.exe" INTERNAL_NAME="pythonservice.exe" LEGAL_COPYRIGHT="" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x5160" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="2.6.214.0" UPTO_BIN_PRODUCT_VERSION="2.6.214.0" LINK_DATE="07/05/2009 02:40:38" UPTO_LINK_DATE="07/05/2009 02:40:38" VER_LANGUAGE="Inglés (Estados Unidos) [0x409]" /> <MATCHING_FILE NAME="tcl\dde1.3\tcldde13.dll" SIZE="18944" CHECKSUM="0x5F6F6F2F" MODULE_TYPE="WIN32" PE_CHECKSUM="0x138A6" LINKER_VERSION="0x0" LINK_DATE="06/12/2008 19:01:43" UPTO_LINK_DATE="06/12/2008 19:01:43" /> <MATCHING_FILE NAME="tcl\reg1.2\tclreg12.dll" SIZE="18432" CHECKSUM="0xBEEC9FAD" MODULE_TYPE="WIN32" PE_CHECKSUM="0xC2A5" LINKER_VERSION="0x0" LINK_DATE="06/12/2008 19:01:42" UPTO_LINK_DATE="06/12/2008 19:01:42" /> <MATCHING_FILE NAME="tcl\tix8.4.3\tix84.dll" SIZE="262656" CHECKSUM="0x3E0EAE66" MODULE_TYPE="WIN32" PE_CHECKSUM="0x4825B" LINKER_VERSION="0x0" LINK_DATE="02/13/2009 17:17:04" UPTO_LINK_DATE="02/13/2009 17:17:04" />
From szcaiji on July 04, 2010 23:39:50
Having the same problem here.
Windows XP SP3, Python 2.6.5 pymssql-1.9.908-py2.6
From aaceves.varios on July 14, 2010 11:38:16
It can be "solved" if you just import pymssql first than anything else.
I think the "WSAENOBUFS: No buffer space available." is not a problem when nobody has used WSAENOBUFS.
It works for me now.
From twalter@thetatts.com on July 15, 2010 09:16:57
Problem occurs whether I import pymssql or _mssql first. This is on
OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 3 Build 2600 Python 2.6.4 ( r264 :75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 pymssql-1.9.908.win32.py2.6
Using any GUI interface to python, be it IDLE or pyscripter, etc. Directly from the command line python interface it will import successfully.
From abawcom on July 15, 2010 17:03:07
Same here. Brand new install of Windows Server 2008 64 bit. import _mssql first doesn't solve the problem. Still crashes.
In fact, if I create a one line program of
import _mssql
It still crashes
OS Name: Microsoft Windows Server 2008 Standard OS Version: 6.0.6002 Service Pack 2 Build 6002 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Server OS Build Type: Multiprocessor Free Registered Owner: Windows User Registered Organization: Original Install Date: 3/1/2010, 11:03:49 PM System Boot Time: 7/15/2010, 1:57:28 PM System Manufacturer: VMware, Inc. System Model: VMware Virtual Platform System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 15 Stepping 1 Ge el ~1995 Mhz BIOS Version: Phoenix Technologies LTD 6.00, 9/22/2009 Windows Directory: C:\Windows System Directory: C:\Windows\system32 Boot Device: \Device\HarddiskVolume1 System Locale: en-us;English (United States) Input Locale: en-us;English (United States) Time Zone: (GMT-08:00) Pacific Time (US & Canada) Total Physical Memory: 2,047 MB Available Physical Memory: 1,166 MB Page File: Max Size: 4,331 MB Page File: Available: 3,451 MB Page File: In Use: 880 MB Page File Location(s): C:\pagefile.sys Domain: WORKGROUP
From xi@resolvent.net on July 23, 2010 18:39:38
Crashes for me when the socket
module is imported before pymssql
.
Example:
python import -c "import socket, pymssql"
crashes, while
python import -c "import pymssql, socket"
works correctly.
From eavesdown on July 28, 2010 15:04:04
There doesn't seem to have been any movement in the past several months on this showstopper (for a fair number of people, at least) issue. Is the project currently stalled/dead?
From daemonbunny66 on August 19, 2010 13:33:26
I don't know how much development has been going down on this, but I've run into this error as well only both Netbeans and when running the script from the command line. If I import it with the python command line, it seems to work fine. I'm running Win7 32-bit w/ 2GB RAM on a Core 2 Duo and Python 2.6.5.
The workaround I have found is to change the module import order at the beginning of my file:
import smtplib import pymssql import poplib -> import smtplib import pymssql import poplib
As long as pymssql is imported first the script will execute no problem. This only applies to modules imported from directories other than the current one and its subdirectories. For some reason this crashes the interpreter. Still working on why though.
From xi@resolvent.net on August 24, 2010 14:22:02
The problem is caused by a bug in freetds, which was fixed here: http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/src/tds/mem.c?r1=1.194&r2=1.195 I attached pymssql win32 binary installer rebuilt against a nightly snapshot of freetds. No guarantees, but it seems to work for me.
Attachment: pymssql-1.9.908.win32-py2.6.exe
From eavesdown on August 24, 2010 14:46:14
Thanks for the repack, xi. I no longer see the crashes on my Windows XP or Server 2008 systems. I'm noticing a few other bugs with the new version, but I still think it would be a good idea to release an official beta build with the updated FreeTDS library to allow users that were previously seeing the crashes to support the testing process.
From akukula on August 24, 2010 16:12:43
It seems that we need help with pymssql development. If you are able to contribute and/or continue the development, don't hesitate to contact me by email.
From mihindu@mtechlanka.com on September 24, 2010 17:32:13
i am using Windows 7 Ulitmate, even tried the repacked version. still it is crashing when import.
From radhika.grr on September 26, 2010 05:18:23
I have this problem too. If I import pymssql first and then it is working but when I try to debug then on the first line (import pymssql) itself is getting crashed. (I haven't tested the repacked pymssql which is available in this thread)
From alswlx on October 22, 2010 21:22:50
IDLE under Win7 crashed, but just fine in PythonWin and cmd
From nkgailei on November 24, 2010 18:03:57
Idle & Eclipse crashed. command line works fine
Windows XP sp3 python 2.6.6 Elcipse 3.6.1(pydev 1.6.3.2010100513)
From lyngshede on April 12, 2011 04:13:46
I had a similar issue. A quick fix is to simply import the pymssql module before anything else that might import the socket module. I had the issue with suds and pymssql, but if pymssql is imported before suds there's no problem.
From brad.alan.smith on October 12, 2011 13:42:34
I can confirm that this issue is real. I had a script that when run as main worked just fine, but when I tried to import that module into a CherryPy web application, I was unable to get it running. Ostensibly this is an issue of competition for ports between CherryPy and pymssql.
However - the installer linked in comment 24 above does in fact work for me. Perhaps that ought to be posted as an updated version so that new users can hopefully avoid this problem...
From nmeixler on April 21, 2010 14:52:55
What steps will reproduce the problem? 1. download newest pymssql for windows on this website
Original issue: http://code.google.com/p/pymssql/issues/detail?id=2