upload-scripts icon indicating copy to clipboard operation
upload-scripts copied to clipboard

Error when downloading imagery - ValueError: unconverted data remains: .000

Open Zh9567 opened this issue 1 year ago • 0 comments

There is an error when I try to download my imagery, not sure whether it is because of the configuration or something, as I have trouble on activating the source bin/activate. But the upload imagery function works fine. Here is the traceback (parts of the path to file omitted for privacy):

Traceback (most recent call last):
  File "...\upload-scripts-master\osc_tools.py", line 243, in <module>
    main()
    ~~~~^^
  File "...\upload-scripts-master\osc_tools.py", line 24, in main
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "...\upload-scripts-master\osc_tools.py", line 136, in download_current_user_data
    download_user_images(path)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "...\upload-scripts-master\download.py", line 50, in download_user_images
    download_success, _ = _download_photo_sequence(osc_api,
                          ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
                                                   sequence,
                                                   ^^^^^^^^^
                                                   sequence_path,
                                                   ^^^^^^^^^^^^^^
                                                   add_gps_to_exif=True)
                                                   ^^^^^^^^^^^^^^^^^^^^^
  File "...\upload-scripts-master\download.py", line 63, in _download_photo_sequence
    photos, error = osc_api.get_photos(sequence.online_id)
                    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "...\upload-scripts-master\osc_api_gateway.py", line 262, in get_photos
    photo = OSCPhoto.photo_from_json(photo_json)
  File "...\upload-scripts-master\osc_api_models.py", line 63, in photo_from_json
    photo.timestamp = datetime.datetime.strptime(shot_date, '%Y-%m-%d %H:%M:%S').timestamp()
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\AppData\Local\Programs\Python\Python313\Lib\_strptime.py", line 676, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
                                    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "...\AppData\Local\Programs\Python\Python313\Lib\_strptime.py", line 458, in _strptime
    raise ValueError("unconverted data remains: %s" %
                      data_string[found.end():])
ValueError: unconverted data remains: .000

Zh9567 avatar Jan 04 '25 09:01 Zh9567