twisted / txaws

Twisted-based Asynchronous Libraries for Amazon Web Services and clouds that support the AWS APIs
MIT License
32 stars 18 forks source link

TypeError: __init__() got an unexpected keyword argument 'credentials' #99

Closed jwtrhs closed 5 years ago

jwtrhs commented 5 years ago

I've been running into an issue using the S3 client on v0.5.0.

TypeError: __init__() got an unexpected keyword argument 'credentials'
  File "txaws/s3/client.py", line 445, in put_object
    d = self._submit(self._query_factory(details))
  File "txaws/s3/client.py", line 82, in _query_factory
    return self.query_factory(credentials=self.creds, details=details, **kw)
  File "txaws/s3/client.py", line 692, in __init__
    super(Query, self).__init__(*args, **kwargs)

It seems query_factory method in the client is attempting to pass a credentials kwarg to the BaseQuery object, however it expects a creds kwarg instead.

https://github.com/twisted/txaws/blob/5c3317376cd47e536625027e38c3b37840175ce0/txaws/s3/client.py#L81-L82

https://github.com/twisted/txaws/blob/5c3317376cd47e536625027e38c3b37840175ce0/txaws/client/base.py#L633-L635

PR here if it helps: https://github.com/twisted/txaws/pull/98

jwtrhs commented 5 years ago

Actually I've run into another error where the details kwarg also isn't present on the BaseQuery.

Is there supposed to be another interface between these two?

jwtrhs commented 5 years ago

Looks like we were using a custom Query object for the query_factory from an old version, all good!