i'm a newbie to sqlobject, and was trying to follow the doc.
i tried the following:
from sqlobject import *
uri = "postgres://user:pass@...:5432/dbname";
conn = connectionForURI(uri)
sqlhub.processConnection = conn
and got the following error:
Traceback (most recent call last):
File "test_sqlobject.py", line 7, in ?
line 307, in query return self._runWithConnection(self._query, s)
line 219, in _runWithConnection conn = self.getConnection()
line 230, in getConnection conn = self.makeConnection()
line 110, in makeConnection conn = self.module.connect(**self.dsn_dict)
TypeError: an integer is required
i'm using psycopg2, and applying the attached patch solved it. it seems
the port must be an integer.
On Sat, Oct 21, 2006 at 11:26:22AM +0200, lekma wrote:
> - dsn_dict["port"] = str(port)
> + dsn_dict["port"] = int(port)
Applied and committed in the revisions 2036, 2037. Thank you!
Oleg Broytmann http://phd.pp.ru/ phd@...
Programmers don't die, they just GOSUB without RETURN.