basak / glacier-cli

Command-line interface to Amazon Glacier
Other
617 stars 55 forks source link

glacier archive retrieve fails #83

Closed gambitcomminc closed 4 years ago

gambitcomminc commented 4 years ago

All commands that we use work except we tested archive retrieval, and it fails with

./glacier archive retrieve --wait our-vault our-file

Traceback (most recent call last): File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/glacier.py", line 618, in App().main() File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/glacier.py", line 604, in main args.func(args) File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/glacier.py", line 483, in archive_retrieve self.archive_retrieve_one(args, name) File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/glacier.py", line 456, in archive_retrieve_one retrieval_jobs = find_retrieval_jobs(vault, archive_id) File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/glacier.py", line 259, in find_retrieval_jobs return [job for job in vault.list_jobs() if job.archive_id == archive_id] File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/boto/glacier/vault.py", line 272, in list_jobs return [Job(self, jd) for jd in response_data['JobList']] File "/home/uwe/tmp/glacier/glacier-cli/glacier-cli/boto/glacier/job.py", line 48, in init setattr(self, attr_name, response_data[response_name]) KeyError: 'CompletionDate'

It looks like the responses from AWS have changed. We fixed the loop through the ResponseDataElements in job.py:

      for response_name, attr_name, default in self.ResponseDataElements:
            try:
                    setattr(self, attr_name, response_data[response_name])
            except KeyError:
                    setattr(self, attr_name, default)

and it seems to work.

basak commented 4 years ago

Thank you for the report! This project doesn't ship that file though. I think it comes from boto? Which version of boto are you using: how did you end up with /home/uwe/tmp/glacier/glacier-cli/glacier-cli/boto/?

basak commented 4 years ago

Closing as this doesn't appear to be an issue in glacier-cli itself and I have received no response.