I've found a solution For this problem. The problem was that for the version Web2py 2.13.4 the newrelic wasnt working. after the i removed the newrelic it worked for me.
On Thursday, February 4, 2016 at 6:39:03 PM UTC+1, [email protected] wrote: > > Hello, > I've the same problem with my app did you found any solution for this > ERROR? > my psycopg2 version is 2.4.5 tried it with 2.6.1 same problem appears. > > On Tuesday, January 12, 2016 at 4:27:24 AM UTC+1, Júlia Rizza wrote: >> >> I have an web2py app connected with a PostgreSQL database and it's >> raising the following error: >> >> <type 'exceptions.TypeError'> must be psycopg2._psycopg.connection, not >> ConnectionWrapper >> >> >> I couldn't figure it out. This is the traceback: >> >> >> Traceback (most recent call last): >> File "/var/www/web2py/gluon/restricted.py", line 227, in restricted >> exec ccode in environment >> File "/var/www/web2py/applications/web2courses/models/02_menu.py" >> <https://juliarizza.com/admin/edit/web2courses/models/02_menu.py>, line 38, >> in <module> >> if auth.has_membership('Teacher') or auth.has_membership('Admin'): >> File "/var/www/web2py/gluon/tools.py", line 4350, in has_membership >> group_id = self.id_group(group_id) # interpret group_id as a role >> File "/var/www/web2py/gluon/tools.py", line 4320, in id_group >> rows = self.db(self.table_group().role == role).select() >> File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 2025, in >> select >> return adapter.select(self.query,fields,attributes) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line >> 1280, in select >> sql = self._select(query, fields, attributes) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line >> 1167, in _select >> sql_w = ' WHERE ' + self.expand(query) if query else '' >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line >> 952, in expand >> rv = op(first, second, **optional_args) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line >> 444, in EQ >> eq = PostgreSQLAdapter.EQ(self, first, second) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line >> 846, in EQ >> self.expand(second, first.type)) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line >> 962, in expand >> rv = self.represent(expression, field_type) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line >> 416, in represent >> return PostgreSQLAdapter.represent(self, obj, fieldtype) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line >> 349, in represent >> return BaseAdapter.represent(self, obj, fieldtype) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line >> 1489, in represent >> return self.adapt(obj) >> File "/var/www/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line >> 53, in adapt >> adapted.prepare(self.connection) >> TypeError: must be psycopg2._psycopg.connection, not ConnectionWrapper >> >> >> Can somebody help me? >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

