On Tue, 23 Sep 2025, at 21:36, Nikolaus Rath wrote:
> On Tue, 23 Sep 2025, at 14:37, 'Joseph Maher' via s3ql wrote:
>> I think this is a different one from the earlier one?  Apologies if not...
>>
>> $ SQLITE_TMPDIR=/mnt/backup/tmp/ fsck.s3ql --fast --log 
>> /mnt/backup/root/.s3ql/fsck.log 
>> --authfile=/mnt/backup/root/.s3ql/authinfo2 
>> --cachedir=/mnt/backup/cache/gs/ gs://backup-echo-maher-org-uk/
>>
> [...]
>>    File "/usr/bin/fsck.s3ql", line 33, in <module>
>>      sys.exit(load_entry_point('s3ql==5.4.0', 'console_scripts', 
>> 'fsck.s3ql')())
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
>>    File "/usr/lib/python3/dist-packages/s3ql/fsck.py", line 1383, in main
>>      upload_metadata(backend, db, param, incremental=False)
>>      ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>    File "/usr/lib/python3/dist-packages/s3ql/database.py", line 680, in 
>> upload_metadata
>>      backend.write_fh(obj, fh, len_=blocksize)
>>      ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
>>    File "/usr/lib/python3/dist-packages/s3ql/backends/comprenc.py", line 
>> 279, in write_fh
>>      return self.backend.write_fh(key, fh, meta_raw, len_=len_)
>>             ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>    File "/usr/lib/python3/dist-packages/s3ql/backends/gs.py", line 425, in 
>> write_fh
>>      return self._write_fh(key, fh, off, len_, metadata or {})
>>             ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>    File "/usr/lib/python3/dist-packages/s3ql/backends/common.py", line 114, 
>> in wrapped
>>      return method(*a, **kw)
>>    File "/usr/lib/python3/dist-packages/s3ql/backends/gs.py", line 503, in 
>> _write_fh
>>      exc = _parse_error_response(resp, self.conn.co_readall())
>>    File "/usr/lib/python3/dist-packages/s3ql/backends/gs.py", line 108, in 
>> _parse_error_response
>>      json_resp = _parse_json_response(resp, body)
>>    File "/usr/lib/python3/dist-packages/s3ql/backends/gs.py", line 140, in 
>> _parse_json_response
>>      body_text = body.decode(charset)
>>                  ^^^^^^^^^^^
>> AttributeError: 'coroutine' object has no attribute 'decode'
>
> That's a different issue (and most likely much easier to fix). Would 
> you mind filing a bug at https://github.com/s3ql/s3ql/issues?

Nevermind that, the fix is trivial:

diff --git a/src/s3ql/backends/gs.py b/src/s3ql/backends/gs.py
index 4ce245fa41..91e5677b6d 100644
--- a/src/s3ql/backends/gs.py
+++ b/src/s3ql/backends/gs.py
@@ -500,7 +500,7 @@
             self.conn.discard()
             raise AccessTokenExpired()
         elif resp.status != 200:
-            exc = _parse_error_response(resp, self.conn.co_readall())
+            exc = _parse_error_response(resp, self.conn.readall())
             raise _map_request_error(exc, key) or exc
         _parse_json_response(resp, self.conn.readall())
 

Best,
-Nikolasu

-- 
You received this message because you are subscribed to the Google Groups 
"s3ql" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/s3ql/4048f351-8b2e-471f-a448-2cad62e58db5%40app.fastmail.com.

Reply via email to