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

TypeError: send_file() got an unexpected keyword argument 'attachment_filename' #4753

Closed
igushev-truesource opened this issue Aug 8, 2022 · 1 comment

Comments

@igushev-truesource
Copy link

Old code start throwing this exception:
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'

@davidism
Copy link
Member

davidism commented Aug 8, 2022

As called out in the changelog:

Remove previously deprecated code. #4667

Old names for some send_file parameters have been removed. download_name replaces attachment_filename, max_age replaces cache_timeout, and etag replaces add_etags. Additionally, path replaces filename in send_from_directory.

These have been raising deprecation warnings since 2.0. Be sure to run your tests with warnings treated as errors so you can respond to deprecations (in any library, not just Flask).

@davidism davidism closed this as completed Aug 8, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants