Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update docs/0.3/tutorial.md #42

wants to merge 1 commit into


None yet
2 participants

There is a missing parameter in the tutorial (host, in the web.database constructor).

@yquemener yquemener Update docs/0.3/tutorial.md
There is a missing parameter in the tutorial (host, in the web.database constructor).

Actually every example seems to miss this argument. The problem may be on my side...

When removing the 'host' argument, I get a connection error. I am using the latest git version (736ce8d7507767e4a3c15ba48f1617dd232f058d) on an ubuntu 12.04. Maybe is this a recent change?


aaronsw commented Oct 4, 2012

Huh, can you paste the error you get? It should use the local machine by default.

Here it is :
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 239, in process
return self.handle()
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 230, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 420, in _delegate
return handle_class(cls)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 396, in handle_class
return tocall(_args)
File "/home/yves/Projects/musing/webstuff/testweb.py", line 14, in GET
todos = db.select('todo')
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 682, in select
return self.query(qout, processed=True)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 643, in query
db_cursor = self._db_cursor()
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 566, in _db_cursor
return self.ctx.db.cursor()
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 507, in _getctx
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 518, in _load_context
ctx.db = self._connect(self.keywords)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 960, in _connect
conn = DB._connect(self, keywords)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/db.py", line 546, in connect
return self.db_module.connect(
File "/usr/lib/python2.7/dist-packages/psycopg2/init.py", line 179, in connect
connection_factory=connection_factory, async=async)
OperationalError: FATAL: Peer authentication failed for user "postgres"

Actually, I made a mistake in my comment : I am not using the git version, but the one installed through easy_install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment