mapillary / mapillary_tools

Command line tools for processing and uploading Mapillary imagery
BSD 2-Clause "Simplified" License
256 stars 134 forks source link

Image upload fails with '500: Internal Server Error' #671

Closed Pygmalion69 closed 4 months ago

Pygmalion69 commented 4 months ago

Basic information

Steps to reproduce behavior

$ ls -1tr images/*JPG | wc -l
402
$ mapillary_tools process images/ --geotag_source "gpx" --geotag_source_path kleve240301-1.gpx --skip_process_errors
Interpolating: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 402/402 [00:01<00:00, 392.88images/s]
Processing: 401images [00:00, 1038.44images/s]
Validating metadatas: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 402/402 [00:00<00:00, 943.79metadata/s]
2024-03-03 15:26:08,379 - INFO    - Checking upload status for 402 metadatas
2024-03-03 15:26:08,409 - INFO    - Check the description file for details: images/mapillary_image_description.json
2024-03-03 15:26:08,410 - INFO    -      402 image(s) read in total
2024-03-03 15:26:08,410 - INFO    -           397 image(s) are ready to be uploaded
2024-03-03 15:26:08,410 - WARNING -             1 image(s) skipped due to MapillaryOutsideGPXTrackError
2024-03-03 15:26:08,410 - WARNING -             4 image(s) skipped due to MapillaryDuplicationError
$ mapillary_tools upload images/ --desc_path images/mapillary_image_description.json --user_name "helfrich" --organization_key "<id>"

\<id> is the ID on my Profile page.

Expected behavior

Upload of 402 images.

Actual behavior

Traceback (most recent call last):
  File "/home/helfrich/.local/lib/python3.8/site-packages/mapillary_tools/upload.py", line 195, in fetch_user_items
    resp = api_v4.fetch_organization(
  File "/home/helfrich/.local/lib/python3.8/site-packages/mapillary_tools/api_v4.py", line 39, in fetch_organization
    resp.raise_for_status()
  File "/home/helfrich/.local/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://graph.mapillary.com/<id>?fields=slug%2Cdescription%2Cname

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/helfrich/.local/bin/mapillary_tools", line 8, in <module>
    sys.exit(main())
  File "/home/helfrich/.local/lib/python3.8/site-packages/mapillary_tools/commands/__main__.py", line 168, in main
    args.func(argvars)
  File "/home/helfrich/.local/lib/python3.8/site-packages/mapillary_tools/commands/upload.py", line 75, in run
    upload(**args)
  File "/home/helfrich/.local/lib/python3.8/site-packages/mapillary_tools/upload.py", line 572, in upload
    user_items = fetch_user_items(user_name, organization_key)
  File "/home/helfrich/.local/lib/python3.8/site-packages/mapillary_tools/upload.py", line 199, in fetch_user_items
    raise wrap_http_exception(ex) from ex
mapillary_tools.upload.UploadHTTPError
ptpt commented 4 months ago
is the ID on my Profile page.

Could you confirm it's an organization ID, not your user ID?

The organization ID is shown as "Organization key" in your organization profile page (you can switch between profiles in the drop menu at left top corner).

Pygmalion69 commented 4 months ago

That part was unclear to me. This solves the issue.