Skip to content

AttributeError: This FileResponse instance has no content attribute. Use streaming_content instead. #5196

@ShubhamKarala

Description

@ShubhamKarala

What happened?

AttributeError: This FileResponse instance has no `content` attribute. Use `streaming_content` instead.

I am getting this error while clicking on any media download link in django admin. I checked inside docker container and files are stored properly. I have used cookiecutter to start the project.

When i

What should've happened instead?

File should be downloaded.

Additional details

  • Host system configuration:

    • Version of cookiecutter CLI (get it with cookiecutter --version): Cookiecutter 1.7.3 from C:\Python310\lib\site-packages (Python 3.1)

    • OS name and version:

      On Linux, run

      lsb_release -a 2> /dev/null || cat /etc/redhat-release 2> /dev/null || cat /etc/*-release 2> /dev/null || cat /etc/issue 2> /dev/null

      On MacOs, run

      sw_vers

      On Windows, via CMD, run

      systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
      
      # OS Name:                   Microsoft Windows 10 Home Single Language
      # OS Version:                10.0.19045 N/A Build 19045
      
    • Python version, run python3 -V: Python 3.12.3

    • Docker version (if using Docker), run docker --version: Docker version 26.1.4, build 5650f9b

    • docker compose version (if using Docker), run docker compose --version: Docker Compose version v2.27.1-desktop.1

    • ...

  • Options selected and/or replay file:
    On Linux and macOS: cat ${HOME}/.cookiecutter_replay/cookiecutter-django.json
    (Please, take care to remove sensitive information)

Logs:
Details
$ cookiecutter https://github.com/cookiecutter/cookiecutter-django
project_name [Project Name]: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions