check sequence content

This commit is contained in:
Stefal 2023-09-19 22:03:33 +02:00
parent f686c36015
commit 06a7a75b60
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ def get_image_data_from_sequences__future(sequences_id, mly_header):
url = 'https://graph.mapillary.com/image_ids?sequence_id={}'.format(sequence_id)
r = requests.get(url, headers=header)
data = r.json()
if data.get('data') == []:
print("Empty or wrong sequence {} of {} - id : {}".format(i+1, len(sequences_id), sequence_id))
continue
image_ids = data['data']
total_image = len(image_ids)
print("{} images in sequence {} of {} - id : {}".format(total_image, i+1, len(sequences_id), sequence_id))