obiba / opal-python-client

Python command lines for accessing Opal web services.
GNU General Public License v3.0
4 stars 3 forks source link

python download file command error #20

Closed tombisho closed 3 years ago

tombisho commented 3 years ago

I am using the backup command to back up a project:

opal backup-project --opal https://opal-dev.mrc-epid.cam.ac.uk:8443 --user administrator --password password --project CNSIM --archive /home/administrator/backup/CNSIM

and then download the file:

opal file --opal http://opal-dev.mrc-epid.cam.ac.uk:8080 --user administrator --password password --download /home/administrator/backup/CNSIM > CNSIM.zip

but I get the error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/opal/core.py", line 309, in store
    self.content = self.content + buf.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 10-11: invalid continuation byte
* Failed writing body (0 != 2742)
* Closing connection 0
(23, 'Failed writing body (0 != 2742)')

This does not happen if I try to download an individual file rather than a directory

ymarcon commented 3 years ago

Duplicate of #19