inaturalist / iNaturalistAPI

Node.js API for iNaturalist.org
https://api.inaturalist.org/
102 stars 32 forks source link

Response validation error for certain images for certain users #423

Open kueda opened 9 months ago

kueda commented 9 months ago

When I do this using a JWT for https://staging.inaturalist.org/people/kueda:

curl -XPOST \
  -H "Authorization: MY-JWT" \
  -F "image=@/Users/kueda/Downloads/PXL_20240212_022733755.jpg" \
  "https://stagingapi.inaturalist.org/v2/computervision/score_image"

with this image: PXL_20240212_022733755

I get this response:

{"status":"500","errors":[{"errorCode":"500","message":"Invalid response for status code 200: common_ancestor/taxon/establishment_means: must NOT have additional properties"}]}

Weirdly, I do the same with a JWT for https://staging.inaturalist.org/people/kueda-test, I do not get an error. I've tried fiddling with the place settings for the kueda user on staging but it doesn't seem to make a difference.

pleary commented 4 months ago

I think this was fixed in 41fcf0bb8189a3daccab12c17757da44222db346. I was able to replicate the problem using the image and user and taxon - it was related to the place associated with the user and the common ancestor taxon. If it occurs again, it would be great to get another test image note which user is experiencing the problem

kueda commented 4 months ago

Seems to still be happening:

Auth as kueda-test, using this request:

curl -XPOST \
  -H "Authorization: kueda-test-jwt" \
  -F "image=@/Users/kueda/Downloads/lupine.jpg" \
  -F "lat=37" \
  -F "lng=-122" \
  --form-string 'fields=(combined_score:!t,taxon:(ancestor_ids:!t,default_photo:(id:!t,url:!t),name:!t,preferred_common_name:!t,rank:!t,rank_level:!t))' \
  "https://stagingapi.inaturalist.org/v2/computervision/score_image"

lupine

kueda commented 3 months ago

I can stell replicate using an auth token for the kueda-test user and this image:

curl -XPOST \
  -H "Authorization: kueda-test-jwt" \
  -F "image=@/Users/kueda/Downloads/zamioculcas.JPG" \
  -F "lat=37" \
  -F "lng=-122" \
  --form-string 'fields=(combined_score:!t,taxon:(ancestor_ids:!t,default_photo:(id:!t,url:!t),name:!t,preferred_common_name:!t,rank:!t,rank_level:!t))' \
  "https://stagingapi.inaturalist.org/v2/computervision/score_image"

zamioculcas