mapillary / mapillary-python-sdk

A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data.
MIT License
39 stars 15 forks source link

[API] Image entity endpoint not able to deal with any other field except `geometry` #35

Closed Rubix982 closed 3 years ago

Rubix982 commented 3 years ago

Describe the bug The endpoint 'https://graph.mapillary.com/:image_id', when passed any other field other than geometry causes the API to fail. The error I get is similar to this,

{
   "error": {
      "message": "Tried accessing nonexisting field (altitude) on node type (ChunkObject)",
      "type": "MLYApiException",
      "code": 100,
      "fbtrace_id": "A514B-_ujHi2raqz20DgoGT"
   }
}

To Reproduce Visit the API endpoint at the below link,

`'https://graph.mapillary.com/219262519730517/?fields=altitude,atomic_scale,camera_parameters,camera_type,captured_at,compass_angle,computed_altitude,computed_compass_angle,computed_geometry,computed_rotation,exif_orientation,geometry,height,thumb_256_url,thumb_1024_url,thumb_2048_url,merge_cc,mesh,quality_score,sequence,sfm_cluster,width&access_token=MLY|XXX

Expected behavior A proper GeoJSON to be returned

Screenshots If applicable, add screenshots to help explain your problem,

image

Additional context This is related to the #13 issue, originally a comment on July 4th converted into this issue.

@cbeddow your thoughts?

cbeddow commented 3 years ago

Let me know if this is solved, should work since the example was using map features endpoint but was asking for images fields, so need to just use matching field names for map features

Rubix982 commented 3 years ago

This problem arises due to a possible mix of the map_feature_key and image_key. There should be an exception that deals with identifying if the key passed is correct or not

Rubix982 commented 3 years ago

Closing