#1142864 TypeError: decoding str is not supported

#1142864#5
Date:
2026-07-27 06:36:28 UTC
From:
To:
Dear Maintainer,

when running "apt-get update" after having configured an S3 repository,
but w/o configuring s3auth.conf in order to access the repository using
AWS instance credentials, the following error occurs:

Traceback (most recent call last):
  File "/usr/lib/apt/methods/s3", line 639, in <module>
    method = S3_method(config)
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib/apt/methods/s3", line 426, in __init__
    self.iam.get_credentials()
  File "/usr/lib/apt/methods/s3", line 234, in get_credentials
    str(self.iamrole, 'utf-8')))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: decoding str is not supported

I could "fix" the problem by removing the "str()" call completely, since
"self.iamrole" is a string already.