glacier-cli icon indicating copy to clipboard operation
glacier-cli copied to clipboard

Retrieval error : TypeError: write() argument must be str, not bytes

Open lucasgautheron opened this issue 5 years ago • 1 comments

I am using glacier-cli via git-annex. It is impossible to retrieve files because of the following error, which occurs with boto==2.48.0 and glacier-cli's head (e9f346d8b968909d85f5ecb843699fc4c5a4b741) using python 3 (I think that might be the issue...).

Here is the stacktrace :

$ git annex get raw_annotations/vtc/tsimane2017_C26_20170713.rttm --from archive-clear
get raw_annotations/vtc/tsimane2017_C26_20170713.rttm (from archive-clear...) 
Traceback (most recent call last):
  File "/home/lgautheron/ChildProjectVenv/bin/glacier", line 11, in <module>
    load_entry_point('glacier-cli==0.1.0', 'console_scripts', 'glacier-cli')()
  File "/home/lgautheron/ChildProjectVenv/lib64/python3.6/site-packages/glacier.py", line 738, in main
    App().main()
  File "/home/lgautheron/ChildProjectVenv/lib64/python3.6/site-packages/glacier.py", line 724, in main
    self.args.func()
  File "/home/lgautheron/ChildProjectVenv/lib64/python3.6/site-packages/glacier.py", line 583, in archive_retrieve
    self.archive_retrieve_one(name)
  File "/home/lgautheron/ChildProjectVenv/lib64/python3.6/site-packages/glacier.py", line 560, in archive_retrieve_one
    self._archive_retrieve_completed(self.args, complete_job, name)
  File "/home/lgautheron/ChildProjectVenv/lib64/python3.6/site-packages/glacier.py", line 540, in _archive_retrieve_completed
    sys.stdout, job, args.multipart_size)
  File "/home/lgautheron/ChildProjectVenv/lib64/python3.6/site-packages/glacier.py", line 524, in _write_archive_retrieval_job
    f.write(job.get_output().read())
TypeError: write() argument must be str, not bytes

  user error (glacier ["--region=eu-west-2","archive","retrieve","-o-","datasets","tsimane2017-data-clear/MD5E-s626444--c47d9a704bf695024f022c3d2958c66a.rttm"] exited 1)
failed
git-annex: get: 1 failed

lucasgautheron avatar Nov 23 '20 09:11 lucasgautheron

Additional information: it works with python2.7 though

lucasgautheron avatar Nov 23 '20 16:11 lucasgautheron