Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
uituit opened this issue Jan 8, 2025 · 0 comments
Open

Comments

@uituit
Copy link

uituit commented Jan 8, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant