Skip to content

Client.__init__() got an unexpected keyword argument 'proxies' #1977

@alan910127

Description

@alan910127

Describe the bug

When using synchronous client to call Reports().get_report_document(), the following error occurs.

    367         if download or file or ("decrypt" in kwargs and kwargs["decrypt"]):
    368             compression_algorithm = res.payload.get("compressionAlgorithm")
--> 369             with httpx.Client(
    370                 proxies=self.proxies,
    371                 verify=self.verify,

TypeError: Client.__init__() got an unexpected keyword argument 'proxies'

To Reproduce

Steps to reproduce the behavior:

  1. Import the Reports client from sp_api.api.
  2. Simply call Reports().get_report_document() and it will happen.

Expected behavior

Should be able to run smoothly as before.

Desktop (please complete the following information):

  • OS: N/A

Additional context

I think it has to do with the added async support (requestshttpx), but some API differences were missed during the migration.

In addition, the client from sp_api.asyncio.api works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions