Title: Bug Report · Issue #150 · mapillary/mapillary-python-sdk · GitHub
Open Graph Title: Bug Report · Issue #150 · mapillary/mapillary-python-sdk
X Title: Bug Report · Issue #150 · mapillary/mapillary-python-sdk
Description: 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...
Open Graph Description: 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 coo...
X Description: 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 coo...
Opengraph URL: https://github.com/mapillary/mapillary-python-sdk/issues/150
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug Report","articleBody":"**Describe the bug**\r\nxtile = int(math.floor((x + EPSILON) * Z2))\r\nValueError: cannot convert float NaN to integer\r\n\r\n\r\n**To Reproduce**\r\nThis is the code I am using to collect th close-to images to a specific coordinates:\r\nfor index, row in enumerate(df.iterrows()):\r\n coordinates_to_image_id_dict: dict = {}\r\n latitude, longitude = dict(row[1])['LATITUDE'], dict(row[1])['LONGITUDE'] \r\n coordinates_to_image_id_dict['lat'] = latitude\r\n coordinates_to_image_id_dict['lng'] = longitude\r\n try:\r\n data= mly.get_image_close_to(\r\n latitude=latitude,\r\n longitude=longitude,\r\n radius=35,\r\n image_type=\"flat\",\r\n min_captured_at=\"2016-01-01\"\r\n ).to_dict()\r\n\r\n except AttributeError:\r\n print('AttributeError occurred')\r\n data = {}\r\n \r\n print(data) \r\n print('latitude and longitude:', latitude, longitude)\r\n\r\n**Expected behavior**\r\nif math.isnan(x):\r\n # handle NaN case here\r\nelse:\r\n xtile = int(math.floor((x + EPSILON) * Z2))\r\n\r\n**Screenshots**\r\nlatitude and longitude: 51.9326934493218 -8.05201349824569\r\nRequesting GET to https://tiles.mapillary.com/maps/vtp/mly1_public/2/14/7892/5318/?access_token=MLY%???\r\nResponse 200 OK received in 78ms\r\n{'type': 'FeatureCollection', 'features': []}\r\n\r\nlatitude and longitude: 53.2429118794892 -6.58873419758931\r\nTraceback (most recent call last):\r\n File \"Data_collection_json_metadata.py\", line 39, in \u003cmodule\u003e\r\n min_captured_at=\"2016-01-01\"\r\n File \"/home/peoplexxx/.local/lib/python3.7/site-packages/mapillary/utils/auth.py\", line 59, in wrapper\r\n return f(*args, **kwargs)\r\n File \"/home/people/xx/.local/lib/python3.7/site-packages/mapillary/interface.py\", line 116, in get_image_close_to\r\n kwargs=kwargs,\r\n File \"/home/people/xx/.local/lib/python3.7/site-packages/mapillary/controller/image.py\", line 110, in get_image_close_to_controller\r\n latitude=latitude,\r\n File \"/home/people/xxx/.local/lib/python3.7/site-packages/mapillary/models/api/vector_tiles.py\", line 123, in fetch_layer\r\n tile=mercantile.tile(lng=longitude, lat=latitude, zoom=zoom),\r\n File \"/home/people/xxxx/.local/lib/python3.7/site-packages/mercantile/__init__.py\", line 426, in tile\r\n xtile = int(math.floor((x + EPSILON) * Z2))\r\nValueError: cannot convert float NaN to integer\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/NeginZarbakhsh","@type":"Person","name":"NeginZarbakhsh"},"datePublished":"2023-03-07T10:41:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/150/mapillary-python-sdk/issues/150"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:821cc963-cb34-9827-0b03-0725053203b7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE2E:18096:71AC58:9AE3E8:698E0A99 |
| html-safe-nonce | ed7cd4af023363d6a5dde211867099f10d690d7e0a7b5e420dfdbc6ebde98057 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTJFOjE4MDk2OjcxQUM1ODo5QUUzRTg6Njk4RTBBOTkiLCJ2aXNpdG9yX2lkIjoiNjg3NjYzNjY0NTc4Njc4MjM2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 80f36630db3d39fc3001de9ea010e3ccfafef36edf2eefbfd2a255d7acbeffa2 |
| hovercard-subject-tag | issue:1613164769 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mapillary/mapillary-python-sdk/150/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f83b776a4db2695bd33914eb9b42237243ab05dadc19be52963e0dd4bfa845d6/mapillary/mapillary-python-sdk/issues/150 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f83b776a4db2695bd33914eb9b42237243ab05dadc19be52963e0dd4bfa845d6/mapillary/mapillary-python-sdk/issues/150 |
| og:image:alt | 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 coo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NeginZarbakhsh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 70a88bfe6d9639434ae7f5a46d15c336b8884978a51526bc55fc57d848f1e3c1 |
| turbo-cache-control | no-preview |
| go-import | github.com/mapillary/mapillary-python-sdk git https://github.com/mapillary/mapillary-python-sdk.git |
| octolytics-dimension-user_id | 5332499 |
| octolytics-dimension-user_login | mapillary |
| octolytics-dimension-repository_id | 377662683 |
| octolytics-dimension-repository_nwo | mapillary/mapillary-python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 377662683 |
| octolytics-dimension-repository_network_root_nwo | mapillary/mapillary-python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2519b16db5550494a653f9a8837c14ef7df80804 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width