when passing Json unpacked float values to geopy distance function, I received a following error:
return distance.distance([lat, lon], [lat2, lon2]).meters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/distance.py", line 540, in __init__
super().__init__(*args, **kwargs)
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/distance.py", line 276, in __init__
kilometers += self.measure(a, b)
^^^^^^^^^^^^^^^^^^
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/distance.py", line 556, in measure
a, b = Point(a), Point(b)
^^^^^^^^
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/point.py", line 175, in __new__
return cls.from_sequence(seq)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/point.py", line 472, in from_sequence
return cls(*args)
^^^^^^^^^^
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/point.py", line 188, in __new__
_normalize_coordinates(latitude, longitude, altitude)
File "/home/przemek/miniconda3/envs/202306-pathway/lib/python3.11/site-packages/geopy/point.py", line 57, in _normalize_coordinates
latitude = float(latitude or 0.0)
^^^^^^^^^^^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'Json'
Relevant log output
-
What did you expect to happen?
Json unpacked float to be a transparent wrapper for float value
Steps to reproduce
when passing Json unpacked float values to geopy distance function, I received a following error:
Relevant log output
What did you expect to happen?
Json unpacked float to be a transparent wrapper for float value
Version
0.8.0
Docker Versions (if used)
No response
OS
Linux
On which CPU architecture did you run Pathway?
None