#35041: DATA_UPLOAD_MAX_MEMORY_SIZE causes a confusing error when not an integer
--------------------------------------+------------------------------------
Reporter: Dimitar Tasev | Owner: nobody
Type: Bug | Status: new
Component: File uploads/storage | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by JoshuaSheng):
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
I was able to reproduce the error using the steps you provided. It seems
like the bug is that we're not properly guarding to ensure we're setting
DATA_UPLOAD_MAX_MEMORY_SIZE as an integer, so I added a guard for it and
added a test in this [https://github.com/django/django/pull/17618 PR]. The
new result of the bug will be:
{{{
Traceback (most recent call last):
File "C:\Users\Josh\PycharmProjects\djangoProject\manage.py", line 22,
in <module>
main()
File "C:\Users\Josh\PycharmProjects\djangoProject\manage.py", line 18,
in main
execute_from_command_line(sys.argv)
File "C:\Users\Josh\django\django\core\management\__init__.py", line
442, in execute_from_command_line
utility.execute()
File "C:\Users\Josh\django\django\core\management\__init__.py", line
436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Josh\django\django\core\management\base.py", line 412, in
run_from_argv
self.execute(*args, **cmd_options)
File
"C:\Users\Josh\django\django\core\management\commands\runserver.py", line
74, in execute
super().execute(*args, **options)
File "C:\Users\Josh\django\django\core\management\base.py", line 458, in
execute
output = self.handle(*args, **options)
File
"C:\Users\Josh\django\django\core\management\commands\runserver.py", line
81, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "C:\Users\Josh\django\django\conf\__init__.py", line 81, in
__getattr__
self._setup(name)
File "C:\Users\Josh\django\django\conf\__init__.py", line 68, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\Josh\django\django\conf\__init__.py", line 191, in
__init__
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: The
DATA_UPLOAD_MAX_MEMORY_SIZE setting must be an int.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35041#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018c716e3518-5e4dec0a-439c-4df1-b7fa-31547175460e-000000%40eu-central-1.amazonses.com.