Repository navigation
Open
Description
Geoalchemy raises an AssertationError when using the API's getDetailedResultInfo method. As a work-around, I can comment out line 88 in base.py, but then it will not actually create a geometry.
File "/home/denver/Documents/ODM2PythonAPI/src/api/ODM2/services/readService.py", line 195, in getDetailedResultInfo
for r,s,m,v,p,u in q.all():
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2398, in all
return list(self)
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 84, in instances
util.raise_from_cause(err)
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 72, in instances
for row in fetch]
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 426, in _instance
loaded_instance, populate_existing, populators)
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/sqlalchemy/orm/loading.py", line 484, in _populate_full
dict_[key] = getter(row)
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/geoalchemy/geometry.py", line 27, in process
return DialectManager.get_spatial_dialect(dialect).process_result(value, self)
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/geoalchemy/mssql.py", line 311, in process_result
return MSPersistentSpatialElement(WKBSpatialElement(value, type.srid))
File "/home/denver/miniconda/envs/SDL-env/lib/python2.7/site-packages/geoalchemy/base.py", line 88, in __init__
assert isinstance(desc, (basestring, buffer))
AssertionError
Metadata
Metadata
Assignees
Labels
No labels
Activity
valentinedwv commentedon Dec 15, 2015
Turn on logging support to SQL in the module.
import logging
logging.basicConfig()
logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG)
Suggestion, can we write a set of tests against the DB's we want to support,
support detailed logging passing echo-true to the create
engine = sqlalchemy.create_engine('postgres://foo/bar', echo=True)
On Mon, Dec 14, 2015 at 1:49 PM, Denver Smith notifications@github.com
wrote:
valentinedwv commentedon Dec 16, 2015
I redid the setup.py, can you make a new virtual environment, and test to see if pulling from the ODM2 forked geoalchemy solves the issue?
emiliom commentedon Dec 16, 2015
@denvaar, are you using the right version of geoalchemy1? See issue #13, including @valentinedwv's comment about the changes he made so that odm2api picks up the right geoalchemy (the odm2 branch of https://github.com/ODM2/geoalchemy)
emiliom commentedon Jan 13, 2016
@denvaar, are you still getting this error, or can we close this issue?
FYI (and for @horsburgh and anyone else), I've created instructions for installing
odm2apiusing conda packages for all the dependencies except geoalchemy, followed by a singlepip installcommand to install odm2api and geoalchemy. See README.md.