Changes with Postgis API with 2.15.2 (st_as_geojson() not working anymore)??

40 views
Skip to first unread message

wish...@gmail.com

unread,
Aug 14, 2017, 4:12:21 PM8/14/17
to web2py-users
Dear friends!

Did anything change with the Postgis API with the 2.15.2 release?

For ages I used db.geotable.position.st_asgeojson() and it worked fine but since the last web2py update I'm seeing expections
'PostgrePsyco' object has no attribute 'ST_ASGEOJSON'

Full stack:
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/home/www-data/web2py/applications/welcome/controllers/default.py", line 885, in <module>
File "/home/www-data/web2py/gluon/globals.py", line 409, in <lambda>
self._caller = lambda f: f()
File "/home/www-data/web2py/gluon/cache.py", line 645, in wrapped_f
rtn = func()
File "/home/www-data/web2py/applications/welcome/controllers/default.py", line 673, in get_geo
db.geotable.position.st_asgeojson(),
File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 1444, in st_asgeojson
return Expression(self.db, self.db._adapter.ST_ASGEOJSON, self,
AttributeError: 'PostgrePsyco' object has no attribute 'ST_ASGEOJSON'

Any ideas how to solve?

Cheers
Toby

Leonel Câmara

unread,
Aug 15, 2017, 7:19:40 AM8/15/17
to web2py-users
Please submit a bug on pydal this is a bug.

Leonel Câmara

unread,
Aug 15, 2017, 1:52:10 PM8/15/17
to web2py-users
I submitted a pull request with a fix if you want you can apply the changes locally to fix your problem:

https://github.com/web2py/pydal/pull/489
Reply all
Reply to author
Forward
0 new messages