Closed stellasia closed 3 years ago
The constructor of WGS84Point
takes a tuple or list of floats. Your example works if you replace
point = WGS84Point(dict(x=2, y=48))
with
point = WGS84Point((2.0, 48.0))
a type check on the driver side would make for a more helpful error message.
You can find more details in the driver's API docs.
Arf, my bad, thanks for this!
Also, apparently, the elements in the tuple need to be floats, it fails with the same error if I use int (ok no one wants to use int for latitude and longitude... except me when testing :) ).
@stellasia Not really your bad. The usage isn't obvious. We should probably coerce these into floats internally.
Hi folks!
I can't seem to get the spatial type working, just getting a crash (stack trace attached).
Neo4j version: Enterprise 4.2.1
Neo4j Mode: Single instance
Python 3.9
Driver version: driver 4.2.1
Operating system: Ubuntu 20.04
Steps to reproduce: run the following piece of code:
neo4j.exceptions.ServiceUnavailable: Failed to read from defunct connection IPv4Address(('localhost', 7687)) (IPv4Address(('127.0.0.1', 7687)))
Full stack trace is attached. neo_spatial.log
Also, only error in server logs is:
MATCH (n:Node) RETURN n.point
returns aneo4j.spatial.WGS84Point
as expected