mapillary / mapillary_tools

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

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://rupload.facebook.com/mapillary_public_uploads/ #598

Closed flohoff closed 1 year ago

flohoff commented 1 year ago

With the tools of today (pip upgrade) i get the following error:

flo@p5:/scratch/local/mapillary/20230221.SqueezeCage.merged$ mapillaryuploadcurrentdir 
Extracting geotags from images: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2947/2947 [00:03<00:00, 842.62images/s]
Extracting GPS tracks from videos: 0videos [00:00, ?videos/s]
Overwriting EXIF: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2917/2917 [00:19<00:00, 151.35images/s]
Verifying image EXIF writing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2917/2917 [00:11<00:00, 261.27images/s]
2023-02-22 08:42:48,674 - INFO    -     2947 image(s) read in total
2023-02-22 08:42:48,674 - INFO    -          2917 image(s) are ready to be uploaded
2023-02-22 08:42:48,675 - WARNING -            30 image(s) skipped due to MapillaryDuplicationError
Traceback (most recent call last):
  File "/home/flo/.local/bin/mapillary_tools", line 8, in <module>
    sys.exit(main())
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/commands/__main__.py", line 168, in main
    args.func(argvars)
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/commands/process_and_upload.py", line 19, in run
    UploadCommand().run(args)
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/commands/upload.py", line 75, in run
    upload(**args)
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/upload.py", line 689, in upload
    clusters = mly_uploader.upload_images(
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/uploader.py", line 201, in upload_images
    cluster_id = self.upload_stream(
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/uploader.py", line 259, in upload_stream
    return _upload_stream(
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/uploader.py", line 469, in _upload_stream
    raise ex
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/uploader.py", line 433, in _upload_stream
    begin_offset = upload_service.fetch_offset()
  File "/home/flo/.local/lib/python3.9/site-packages/mapillary_tools/upload_api_v4.py", line 102, in fetch_offset
    resp.raise_for_status()
  File "/home/flo/.local/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://rupload.facebook.com/mapillary_public_uploads/mly_tools_3de996e50cc9ce223af3d80ee4116129.zip

Command i executed:

time ~/.local/bin/mapillary_tools process_and_upload \
    --overwrite_EXIF_direction_tag \
    --skip_process_errors \
    --interpolate_directions \
    --cutoff_time 4 \
    --user_name flohoff \
    .
flohoff commented 1 year ago

After playing around a bit i "authenticated" again - et voila it works.

There should be better error messages that this is an authentication issue.

Flo