[sqlalchemy] InvalidRequestError: Unknown PG numeric type: 23

2010-10-25 Thread ellonweb
I've added a few extra columns to one of my tables (nothing fancy,
just plain Integers and Floats) and created them manually in the db.
Now every time I try to query an object from this table I get the
error in the subject. Using declarative in SA 0.6.3 on PG8.4.
Traceback below, any help is much appreciated!

  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\query.py, line 1405, in __getitem__
return list(res)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\query.py, line 1565, in __iter__
return self._execute_and_instances(context)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\query.py, line 1570, in
_execute_and_instances
mapper=self._mapper_zero_or_none())
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\session.py, line 735, in execute
clause, params or {})
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 1157, in execute
params)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 1237, in
_execute_clauseelement
return self.__execute_context(context)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 1278, in __execute_context
r = context.get_result_proxy()._autoclose()
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\dialects\postgresql\psycopg2.py, line 156, in
get_result_proxy
return base.ResultProxy(self)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 2169, in __init__
self._init_metadata()
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 2176, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 2047, in __init__
result_processor(dialect, coltype)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\dialects\postgresql\psycopg2.py, line 99, in
result_processor
raise exc.InvalidRequestError(Unknown PG numeric type: %d %
coltype)
InvalidRequestError: Unknown PG numeric type: 23

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



Re: [sqlalchemy] InvalidRequestError: Unknown PG numeric type: 23

2010-10-25 Thread Michael Bayer
this sounds like you're receiving an INTEGER column as a Numeric or Float.

We should get 23 and such in there, thought we had gotten to this already but 
apparently not so ticket #1955 is added but for now make sure that column is 
declared as Integer.



On Oct 25, 2010, at 7:35 PM, ellonweb wrote:

 I've added a few extra columns to one of my tables (nothing fancy,
 just plain Integers and Floats) and created them manually in the db.
 Now every time I try to query an object from this table I get the
 error in the subject. Using declarative in SA 0.6.3 on PG8.4.
 Traceback below, any help is much appreciated!
 
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\orm\query.py, line 1405, in __getitem__
return list(res)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\orm\query.py, line 1565, in __iter__
return self._execute_and_instances(context)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\orm\query.py, line 1570, in
 _execute_and_instances
mapper=self._mapper_zero_or_none())
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\orm\session.py, line 735, in execute
clause, params or {})
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\engine\base.py, line 1157, in execute
params)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\engine\base.py, line 1237, in
 _execute_clauseelement
return self.__execute_context(context)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\engine\base.py, line 1278, in __execute_context
r = context.get_result_proxy()._autoclose()
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\dialects\postgresql\psycopg2.py, line 156, in
 get_result_proxy
return base.ResultProxy(self)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\engine\base.py, line 2169, in __init__
self._init_metadata()
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\engine\base.py, line 2176, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\engine\base.py, line 2047, in __init__
result_processor(dialect, coltype)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
 py2.6.egg\sqlalchemy\dialects\postgresql\psycopg2.py, line 99, in
 result_processor
raise exc.InvalidRequestError(Unknown PG numeric type: %d %
 coltype)
 InvalidRequestError: Unknown PG numeric type: 23
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 sqlalchemy group.
 To post to this group, send email to sqlalch...@googlegroups.com.
 To unsubscribe from this group, send email to 
 sqlalchemy+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sqlalchemy?hl=en.
 

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.