You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not familiar with that library. What is the output of print(repr(WKBElement.__bases__))? What versions of simplejson, geoalchemy2, sqlalchemy, and python are you using?
I'm afraid that this is awkward with recent versions of simplejson because of the way that sqlalchemy.sql.functions.Function implements __getattr__. The issue is that for any unknown attribute, Function.attribute returns a callable, which for certain properties (such as _asdict and for_json in this case), simplejson thinks the result of that function should be a dict-like or json serializable object but it isn't.
The workaround in this case is to turn off the namedtuple_as_object and for_json options.
I tried to use the
default
as parser to due withWKBElement
, but the code is not going into the parser, how could I do the customized serialization?The text was updated successfully, but these errors were encountered: