[Qgis-developer] Re: Qgis under windows: problems with python and sqlalchemy: bad file descriptor

Luca Mandolesi mandoluca at gmail.com
Mon Mar 22 18:26:17 EDT 2010


Under windows I receive this error:

Traceback (most recent call last):
  File "C:/Documents and Settings/Administrator/.qgis//python/plugins
\pyarchinit\pyarchinit_Site_mainapp.py", line 217, in
on_pushButton_save_pressed
    test_insert = self.insert_new_rec()
  File "C:/Documents and Settings/Administrator/.qgis//python/plugins
\pyarchinit\pyarchinit_Site_mainapp.py", line 234, in insert_new_rec

    self.DB_MANAGER.max_num_id(self.TABLE_NAME, self.ID_TABLE)+1,
  File "C:/Documents and Settings/Administrator/.qgis//python/plugins
\pyarchinit\modules\db\pyarchinit_db_manager.py", line 262, in
max_num_id
    table = Table(self.id_table, self.metadata, autoload = True)
  File "c:\python25\Lib\site-packages\sqlalchemy\schema.py", line 108,
in __call__
    return type.__call__(self, name, metadata, *args, **kwargs)
  File "c:\python25\Lib\site-packages\sqlalchemy\schema.py", line 236,
in __init__
    _bind_or_error(metadata).reflecttable(self,
include_columns=include_columns)
  File "c:\python25\Lib\site-packages\sqlalchemy\engine\base.py", line
1265, in reflecttable
    self.dialect.reflecttable(conn, table, include_columns)
  File "c:\python25\Lib\site-packages\sqlalchemy\databases
\postgres.py", line 638, in reflecttable
    c = connection.execute(t, table=table_oid)
  File "c:\python25\Lib\site-packages\sqlalchemy\engine\base.py", line
824, in execute
    return Connection.executors[c](self, object, multiparams, params)
  File "c:\python25\Lib\site-packages\sqlalchemy\engine\base.py", line
874, in _execute_clauseelement
    return self.__execute_context(context)
  File "c:\python25\Lib\site-packages\sqlalchemy\engine\base.py", line
896, in __execute_context
    self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
  File "c:\python25\Lib\site-packages\sqlalchemy\engine\base.py", line
946, in _cursor_execute
    self.engine.logger.info(repr(parameters))
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 985,
in info
    apply(self._log, (INFO, msg, args), kwargs)
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 1101,
in _log
    self.handle(record)
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 1111,
in handle
    self.callHandlers(record)
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 1148,
in callHandlers
    hdlr.handle(record)
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 655,
in handle
    self.emit(record)
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 757,
in emit
    self.handleError(record)
  File "C:\OSGeo4W\apps\Python25\lib\logging\__init__.py", line 706,
in handleError
    traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
  File "C:\OSGeo4W\apps\Python25\lib\traceback.py", line 128, in
print_exception
    print_tb(tb, limit, file)
  File "C:\OSGeo4W\apps\Python25\lib\traceback.py", line 70, in
print_tb
    '  File "%s", line %d, in %s' % (filename,lineno,name))
  File "C:\OSGeo4W\apps\Python25\lib\traceback.py", line 16, in _print
    file.write(str+terminator)
IOError: [Errno 9] Bad file descriptor

Versione Python:
2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]

Percorso Python: ['C:/Documents and Settings/Administrator/.qgis//
python/plugins\\pyarchinit\\modules\\gui', 'C:/Documents and Settings/
Administrator/.qgis//python/plugins\\pyarchinit\\modules\\gis', 'C:/
Documents and Settings/Administrator/.qgis//python/plugins\\pyarchinit\
\modules\\db', 'C:/Documents and Settings/Administrator/.qgis//python/
plugins\\pyarchinit\\modules\\utility', 'C:/Documents and Settings/
Administrator/.qgis//python/plugins\\pyarchinit', 'C:/OSGeo4W/apps/
qgis-unstable/./python', 'C:/Documents and Settings/
Administrator/.qgis//python', 'C:/Documents and Settings/
Administrator/.qgis//python/plugins', 'C:/OSGeo4W/apps/qgis-unstable/./
python/plugins', 'C:\\OSGeo4W\\apps\\gdal-16\\pymod', 'C:\\', 'C:\
\WINDOWS\\system32\\python25.zip', 'C:\\OSGeo4W\\apps\\Python25\
\DLLs', 'C:\\OSGeo4W\\apps\\Python25\\lib', 'C:\\OSGeo4W\\apps\
\Python25\\lib\\plat-win', 'C:\\OSGeo4W\\apps\\Python25\\lib\\lib-tk',
'C:\\OSGeo4W\\apps\\qgis-unstable\\bin', 'C:\\OSGeo4W\\apps\
\Python25', 'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages', 'C:\
\OSGeo4W\\apps\\Python25\\lib\\site-packages\\win32', 'C:\\OSGeo4W\
\apps\\Python25\\lib\\site-packages\\win32\\lib', 'C:\\OSGeo4W\\apps\
\Python25\\lib\\site-packages\\Pythonwin', 'C:\\OSGeo4W\\apps\
\Python25\\lib\\site-packages\\wx-2.8-msw-unico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100322/fd195c15/attachment-0001.html


More information about the Qgis-developer mailing list