Skip to content

KeyError: 'content-disposition' when I tried to download Sales report #5

Description

@uituit

Thank you for the great work! I've been using the applaud library in the last 2 years to download reports from App Store Connect. It really is a time-saver and streamlined the workflow.

However, when I tried to download the Sales report of last month, a KeyError: 'content-disposition' shows up, with errors from:

applaud\endpoints\sales_reports.py", line 77, in get return super()._perform_get(stream=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

\applaud\endpoints\base.py", line 102, in _perform_get return self.__parse_response(response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

\applaud\endpoints\base.py", line 89, in __parse_response return GzipStreamResponse(response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

\applaud\schemas\responses.py", line 18, in __init__ self.default_gzip_filename = response.headers.get('x-reports-filename') or response.headers['Content-Disposition'].split('filename=')[1].strip('"') ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^

\site-packages\requests\structures.py", line 52, in __getitem__ return self._store[key.lower()][1] ~~~~~~~~~~~^^^^^^^^^^^^^

It appears to me that it is not getting the gzip file from Apple correctly.

May I know if anyone knows how it can be fixed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions