Re: [SQLObject] _idName not working for me.
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2005-02-08 15:40:49
|
On Tue, Feb 08, 2005 at 10:14:05AM -0500, Ben Scherrey wrote: > CREATE TABLE entity > ( > entity_id serial NOT NULL, > url varchar, > CONSTRAINT entity_pkey PRIMARY KEY (entity_id) > ) > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > File "C:\Python24\Lib\site-packages\sqlobject\main.py", line 179, in > __new__ > newClass.addColumnsFromDatabase() > File "C:\Python24\Lib\site-packages\sqlobject\main.py", line 505, in > addColumnsFromDatabase > for columnDef in conn.columnsFromSchema(cls._table, cls): > File > "C:\Python24\Lib\site-packages\sqlobject\postgres\pgconnection.py", line > 187, in columnsFromSchema > colClass, kw = self.guessClass(t) > File > "C:\Python24\Lib\site-packages\sqlobject\postgres\pgconnection.py", line > 201, in guessClass > return col.StringCol, {'length': int(t[t.index('(')+1:-1])} > ValueError: substring not found It seems the problem is not in entity_id, but in guessing type for the "url" column... Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |