Bug Report
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với mapillary/controller/image.py tại get_image_close_to_controller và mapillary/models/api/vector_tiles.py tại fetch_layer, sau đó tái hiện các tọa độ được báo cáo thông qua get_image_close_to. Kiểm tra cách lời gọi đi đến mercantile.tile và so sánh kết quả với cách xử lý NaN được issue mong đợi; được xem là hoàn tất khi request không còn thất bại bất ngờ với input này và hành vi đã được bao phủ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
xtile = int(math.floor((x + EPSILON) * Z2))
ValueError: cannot convert float NaN to integer
To Reproduce
This is the code I am using to collect th close-to images to a specific coordinates:
for index, row in enumerate(df.iterrows()):
coordinates_to_image_id_dict: dict = {}
latitude, longitude = dict(row[1])['LATITUDE'], dict(row[1])['LONGITUDE']
coordinates_to_image_id_dict['lat'] = latitude
coordinates_to_image_id_dict['lng'] = longitude
try:
data= mly.get_image_close_to(
latitude=latitude,
longitude=longitude,
radius=35,
image_type="flat",
min_captured_at="2016-01-01"
).to_dict()
except AttributeError:
print('AttributeError occurred')
data = {}
print(data)
print('latitude and longitude:', latitude, longitude)
Expected behavior
if math.isnan(x):
# handle NaN case here
else:
xtile = int(math.floor((x + EPSILON) * Z2))
Screenshots
latitude and longitude: 51.9326934493218 -8.05201349824569
Requesting GET to https://tiles.mapillary.com/maps/vtp/mly1_public/2/14/7892/5318/?access_token=MLY%???
Response 200 OK received in 78ms
{'type': 'FeatureCollection', 'features': []}
latitude and longitude: 53.2429118794892 -6.58873419758931
Traceback (most recent call last):
File "Data_collection_json_metadata.py", line 39, in
min_captured_at="2016-01-01"
File "/home/peoplexxx/.local/lib/python3.7/site-packages/mapillary/utils/auth.py", line 59, in wrapper
return f(*args, **kwargs)
File "/home/people/xx/.local/lib/python3.7/site-packages/mapillary/interface.py", line 116, in get_image_close_to
kwargs=kwargs,
File "/home/people/xx/.local/lib/python3.7/site-packages/mapillary/controller/image.py", line 110, in get_image_close_to_controller
latitude=latitude,
File "/home/people/xxx/.local/lib/python3.7/site-packages/mapillary/models/api/vector_tiles.py", line 123, in fetch_layer
tile=mercantile.tile(lng=longitude, lat=latitude, zoom=zoom),
File "/home/people/xxxx/.local/lib/python3.7/site-packages/mercantile/init.py", line 426, in tile
xtile = int(math.floor((x + EPSILON) * Z2))
ValueError: cannot convert float NaN to integer
- Ngôn ngữ chính
- Python
- Star
- 66
- Fork
- 23
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 11
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapillary/mapillary-python-sdk
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
How to render 'spherical' images Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
mapillary/mapillary-python-sdk#156 · 1 bình luận ·
-
point cloud data Đang mởexample
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
mapillary/mapillary-python-sdk#147 · 11 bình luận ·
-
feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
mapillary/mapillary-python-sdk#127 · 1 bình luận · 2 reaction ·
-
feature
mapillary/mapillary-python-sdk#119 · 1 người được giao ·
Tất cả issue của mapillary/mapillary-python-sdk
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·