gracedb command-line client from ligo-gracedb==1.29.dev1 does not let me upload files
Created by Tito Dal Canton on June 26, 2018. Copied from redmine (https://bugs.ligo.org/redmine/issues/6173)
I am using the gracedb client from ligo-gracedb==1.29.dev1 to upload a plot on gracedb-playground:
$ gracedb upload G0047 snr_series_1213945571.517.png 'Plot of SNR timeseries at each detector'
This was working a few days ago; I now get
Traceback (most recent call last):
File "/home/tito/.local/bin/gracedb", line 564, in <module>
code = main()
File "/home/tito/.local/bin/gracedb", line 358, in main
tagName, tagDispName)
File "/home/tito/.local/lib/python3.4/site-packages/ligo/gracedb/utils.py", line 26, in inner
**kwargs)
File "/home/tito/.local/lib/python3.4/site-packages/ligo/gracedb/rest.py", line 1084, in writeLog
return self.post(uri, body, files=files)
File "/home/tito/.local/lib/python3.4/site-packages/ligo/gracedb/rest.py", line 282, in post
return self.post_or_put_or_patch("POST", *args, **kwargs)
File "/home/tito/.local/lib/python3.4/site-packages/ligo/gracedb/rest.py", line 304, in post_or_put_or_patch
content_type, body = encode_multipart_formdata(body, files)
File "/home/tito/.local/lib/python3.4/site-packages/ligo/gracedb/rest.py", line 1829, in encode_multipart_formdata
L.append(b'Content-Disposition: form-data; name="%s"' % key.encode())
TypeError: unsupported operand type(s) for %: 'bytes' and 'bytes'
Am I doing something wrong?