# Mystery Errors

**URL:** https://forum.djangoproject.com/c/users/mystery-errors/22.md

[Latest](https://forum.djangoproject.com/latest.md) · [Categories](https://forum.djangoproject.com/categories.md) · [Tags](https://forum.djangoproject.com/tags.md)

---

## [About the Mystery Errors category](https://forum.djangoproject.com/t/about-the-mystery-errors-category/17686)

<div class="topic-metadata">

**Author:** [@andrewgodwin](https://forum.djangoproject.com/u/andrewgodwin)\
**Replies:** 0

</div>

Discussons of error messages and other problems where you don’t know where to start In your post, please include: The complete traceback of any errors you are receiving. The code that you think may be causing the …

---

## [wired behavior after update from 3.2.25 to 4.2.14](https://forum.djangoproject.com/t/wired-behavior-after-update-from-3-2-25-to-4-2-14/33155)

<div class="topic-metadata">

**Author:** [@oreitan](https://forum.djangoproject.com/u/oreitan)\
**Replies:** 1\
**Last updated:** [September 29, 2026, 3:42am UTC](https://forum.djangoproject.com/t/wired-behavior-after-update-from-3-2-25-to-4-2-14/33155 "2026-09-29T03:42:05Z")

</div>

after I update from ver 3.2.25 to 4.2.14 I can’t run my server locally with any error. I found the line of code that ‘’ of the problem class ApiConfig(AppConfig): name = “api” def ready(self): from api.scheduler.…

---

## [Best practice for intercepting error responses in Django and DRF](https://forum.djangoproject.com/t/best-practice-for-intercepting-error-responses-in-django-and-drf/29734)

<div class="topic-metadata">

**Author:** [@BarbaBillios](https://forum.djangoproject.com/u/BarbaBillios)\
**Replies:** 1\
**Last updated:** [September 18, 2026, 8:59pm UTC](https://forum.djangoproject.com/t/best-practice-for-intercepting-error-responses-in-django-and-drf/29734 "2026-09-18T20:59:14Z")

</div>

I have a Django app that uses the Django Rest Framework. Errors may occur on the Django side, like integrity errors in the database. The default error response will be something like: { "details": { "email": "user…

---

## [Issue with parallel test runner on Python 3.14](https://forum.djangoproject.com/t/issue-with-parallel-test-runner-on-python-3-14/45958)

<div class="topic-metadata">

**Author:** [@cuu508](https://forum.djangoproject.com/u/cuu508)\
**Replies:** 3\
**Last updated:** [September 14, 2026, 10:51am UTC](https://forum.djangoproject.com/t/issue-with-parallel-test-runner-on-python-3-14/45958 "2026-09-14T10:51:32Z")

</div>

I’m not sure if I’ve hit a bug or I’m holding it wrong. In my project I use a custom test runner which overrides a few Django settings (adds MD5 password hasher to PASSWORD\_HASHERS for speed, stuff like that). The test …

---

## [(Solved) Is this a bug or am I missing something: SuspiciousFileOperation -\> Detected path traversal attempt in](https://forum.djangoproject.com/t/solved-is-this-a-bug-or-am-i-missing-something-suspiciousfileoperation-detected-path-traversal-attempt-in/45943)

<div class="topic-metadata">

**Author:** [@2old4it](https://forum.djangoproject.com/u/2old4it)\
**Replies:** 4\
**Last updated:** [September 8, 2026, 2:20pm UTC](https://forum.djangoproject.com/t/solved-is-this-a-bug-or-am-i-missing-something-suspiciousfileoperation-detected-path-traversal-attempt-in/45943 "2026-09-08T14:20:32Z")

</div>

Hello all, I have a problem with relative paths while storing files. Snipped from settings.py if DEBUG: MEDIA\_ROOT = BASE\_DIR / "../data/" I like to keep all uploaded files outside my source directory, even in DE…

---

## [Accessing move\_in\_date field within form causes KeyError](https://forum.djangoproject.com/t/accessing-move-in-date-field-within-form-causes-keyerror/45939)

<div class="topic-metadata">

**Author:** [@IgorArnaut](https://forum.djangoproject.com/u/IgorArnaut)\
**Replies:** 3\
**Last updated:** [September 8, 2026, 10:04am UTC](https://forum.djangoproject.com/t/accessing-move-in-date-field-within-form-causes-keyerror/45939 "2026-09-08T10:04:26Z")

</div>

Model Terms has a field named move\_in\_date. listings/models.py: class Terms(models.Model): move\_in\_date = models.DateField(auto\_now\_add=True) deposit = models.BooleanField() for\_students = models.BooleanFie…

---

## [django SRID conflict between django and mysql](https://forum.djangoproject.com/t/django-srid-conflict-between-django-and-mysql/40544)

<div class="topic-metadata">

**Author:** [@momenkittaneh](https://forum.djangoproject.com/u/momenkittaneh)\
**Replies:** 2\
**Last updated:** [September 5, 2026, 7:32am UTC](https://forum.djangoproject.com/t/django-srid-conflict-between-django-and-mysql/40544 "2026-09-05T07:32:54Z")

</div>

hi, i have this issue after updating srid on my mysql database from srid 0 to srid 3857 when i save new entry this exception occured Exception Type: OperationalError Exception Value: (3643, “The SRID of the ge…

---

## [RasterField with SRID=None: Don't force transform](https://forum.djangoproject.com/t/rasterfield-with-srid-none-dont-force-transform/28745)

<div class="topic-metadata">

**Author:** [@PhilippBuehler](https://forum.djangoproject.com/u/PhilippBuehler)\
**Replies:** 1\
**Last updated:** [September 4, 2026, 6:44pm UTC](https://forum.djangoproject.com/t/rasterfield-with-srid-none-dont-force-transform/28745 "2026-09-04T18:44:38Z")

</div>

When using the Django Geospatial API together with Postgis Raster, I tried setting the SRID of RasterField to None, which seems to work: rast = django.contrib.gis.db.models.RasterField(srid=None) But then adding a Rast…

---

## [Django Website API Requests Occasionally Return Stale Data Even After the Database Record Has Been Updated](https://forum.djangoproject.com/t/django-website-api-requests-occasionally-return-stale-data-even-after-the-database-record-has-been-updated/45851)

<div class="topic-metadata">

**Author:** [@benstokes](https://forum.djangoproject.com/u/benstokes)\
**Replies:** 2\
**Last updated:** [August 24, 2026, 10:41am UTC](https://forum.djangoproject.com/t/django-website-api-requests-occasionally-return-stale-data-even-after-the-database-record-has-been-updated/45851 "2026-08-24T10:41:58Z")

</div>

Hello Django Community, I am currently facing one specific problem with my Django website where an API endpoint occasionally returns an older version of a record even though the corresponding database record has already…

---

## [Django Session Data Is Being Lost Intermittently After Users Navigate Between Pages on My Website](https://forum.djangoproject.com/t/django-session-data-is-being-lost-intermittently-after-users-navigate-between-pages-on-my-website/45706)

<div class="topic-metadata">

**Author:** [@glenphillipsoop](https://forum.djangoproject.com/u/glenphillipsoop)\
**Replies:** 3\
**Last updated:** [August 18, 2026, 10:01pm UTC](https://forum.djangoproject.com/t/django-session-data-is-being-lost-intermittently-after-users-navigate-between-pages-on-my-website/45706 "2026-08-18T22:01:04Z")

</div>

Hello Django Community, I am currently facing one persistent issue with my Django website where authenticated users intermittently lose their session data while navigating between pages. The login process itself works c…

---

## [square brackets bug](https://forum.djangoproject.com/t/square-brackets-bug/29632)

<div class="topic-metadata">

**Author:** [@ian-atkinson](https://forum.djangoproject.com/u/ian-atkinson)\
**Replies:** 19\
**Last updated:** [August 18, 2026, 6:24am UTC](https://forum.djangoproject.com/t/square-brackets-bug/29632 "2026-08-18T06:24:29Z")

</div>

Hi, Have just tried to log a ticket for a bug however the ticket tracker said it was 94% convinced it was spam so wouldn’t take it, um lucky me? Not sure if this is the right place but putting it here instead for someon…

---

## [How to make log format fields optional?](https://forum.djangoproject.com/t/how-to-make-log-format-fields-optional/45695)

<div class="topic-metadata">

**Author:** [@IgorArnaut](https://forum.djangoproject.com/u/IgorArnaut)\
**Replies:** 3\
**Last updated:** [August 7, 2026, 2:28pm UTC](https://forum.djangoproject.com/t/how-to-make-log-format-fields-optional/45695 "2026-08-07T14:28:47Z")

</div>

I configured loggng like this in the realestate/settings.py file. LOGGING = { "version": 1, "disable\_existing\_loggers": False, "formatters": { "standard": { "format": "%(asctime)s \[%(leve…

---

## [decorator @login\_required does not come back to login page](https://forum.djangoproject.com/t/decorator-login-required-does-not-come-back-to-login-page/45659)

<div class="topic-metadata">

**Author:** [@chesapeakebayy-sketc](https://forum.djangoproject.com/u/chesapeakebayy-sketc)\
**Replies:** 5\
**Last updated:** [August 3, 2026, 5:35pm UTC](https://forum.djangoproject.com/t/decorator-login-required-does-not-come-back-to-login-page/45659 "2026-08-03T17:35:09Z")

</div>

I am using: from django.contrib.auth.decorators import login\_required so I have defined a view for user profiles, but obviously, this one must be only accessed whenever its user is logged in, otherwise, the login page …

---

## [Debouncing Forms](https://forum.djangoproject.com/t/debouncing-forms/45515)

<div class="topic-metadata">

**Author:** [@Logitude](https://forum.djangoproject.com/u/Logitude)\
**Replies:** 16\
**Last updated:** [August 3, 2026, 8:51am UTC](https://forum.djangoproject.com/t/debouncing-forms/45515 "2026-08-03T08:51:05Z")

</div>

I’ve had a case where a user has created duplicate database entries via a form. In this case matches in a board game tournament. Is there a known good way to prevent this? I have a review page now, with the fields store…

---

## [Getting Django-allauth and Django-Axes to cooperate](https://forum.djangoproject.com/t/getting-django-allauth-and-django-axes-to-cooperate/45641)

<div class="topic-metadata">

**Author:** [@onyeibo](https://forum.djangoproject.com/u/onyeibo)\
**Replies:** 0\
**Last updated:** [August 1, 2026, 12:45pm UTC](https://forum.djangoproject.com/t/getting-django-allauth-and-django-axes-to-cooperate/45641 "2026-08-01T12:45:09Z")

</div>

I recently incorporated django-axes into a Django project that uses django-allauth for logins. On the development machine, it all seems to work (strangely) but it fails in production environment. Here is what I get: F…

---

## ['Page not found' error (Python Crash Course exercises)](https://forum.djangoproject.com/t/page-not-found-error-python-crash-course-exercises/45464)

<div class="topic-metadata">

**Author:** [@vpcocco-eng](https://forum.djangoproject.com/u/vpcocco-eng)\
**Replies:** 7\
**Last updated:** [July 13, 2026, 3:15pm UTC](https://forum.djangoproject.com/t/page-not-found-error-python-crash-course-exercises/45464 "2026-07-13T15:15:08Z")

</div>

In the 2nd Edition Python Crash Course, Chapter 19 - Letting Users Edit Entries: I’ve made the coding changes to urls.py and created the edit\_entry.html page. To test the new edit functionality I pull up the page to ma…

---

## [Django Session Data Is Not Persisting Consistently When Saving User Progress on My Morse Code Website](https://forum.djangoproject.com/t/django-session-data-is-not-persisting-consistently-when-saving-user-progress-on-my-morse-code-website/45463)

<div class="topic-metadata">

**Author:** [@benstokes](https://forum.djangoproject.com/u/benstokes)\
**Replies:** 1\
**Last updated:** [July 12, 2026, 6:15pm UTC](https://forum.djangoproject.com/t/django-session-data-is-not-persisting-consistently-when-saving-user-progress-on-my-morse-code-website/45463 "2026-07-12T18:15:26Z")

</div>

I am developing a Morse Code learning website using Django where users can translate text into Morse code, decode messages, and practice interactive lessons. The website also allows authenticated users to save their lear…

---

## [django run project](https://forum.djangoproject.com/t/django-run-project/45406)

<div class="topic-metadata">

**Author:** [@ALTUM-02](https://forum.djangoproject.com/u/ALTUM-02)\
**Replies:** 2\
**Last updated:** [July 2, 2026, 7:26am UTC](https://forum.djangoproject.com/t/django-run-project/45406 "2026-07-02T07:26:34Z")

</div>

during running my project there is error appear that is , \[01/Jul/2026 14:40:54\] code 400, message Bad request version (‘\\xc6\\xeb\\x04\\xaf\\x17zc’) \[01/Jul/2026 14:40:54\] You’re accessing the development server over HTTP…

---

## [Short relations.... They end when updating Organisation](https://forum.djangoproject.com/t/short-relations-they-end-when-updating-organisation/45325)

<div class="topic-metadata">

**Author:** [@FireDragon42](https://forum.djangoproject.com/u/FireDragon42)\
**Replies:** 3\
**Last updated:** [June 20, 2026, 3:52pm UTC](https://forum.djangoproject.com/t/short-relations-they-end-when-updating-organisation/45325 "2026-06-20T15:52:13Z")

</div>

My relation instances last untill I update the Organisation instance it refers to. I have checked a lot and it always occurs around my organisation = organisation\_form.save(). Before that the relation exists and after th…

---

## [Circular import when using get\_user\_model() inside a custom BaseUserManager](https://forum.djangoproject.com/t/circular-import-when-using-get-user-model-inside-a-custom-baseusermanager/45297)

<div class="topic-metadata">

**Author:** [@HushmKun](https://forum.djangoproject.com/u/HushmKun)\
**Replies:** 4\
**Last updated:** [June 15, 2026, 9:53pm UTC](https://forum.djangoproject.com/t/circular-import-when-using-get-user-model-inside-a-custom-baseusermanager/45297 "2026-06-15T21:53:46Z")

</div>

Hi everyone! I have been creating a sample Saas and wanted to organize my project from the start in a neat & tidy way. so I decided to move the apps I create into apps directory in the following way: D:. ª uv.lock ª …

---

## [SessionAuthentication enforcing CSRF on @action decorator when permission\_classes is overridden despite JWTAuthentication set on viewset](https://forum.djangoproject.com/t/sessionauthentication-enforcing-csrf-on-action-decorator-when-permission-classes-is-overridden-despite-jwtauthentication-set-on-viewset/45246)

<div class="topic-metadata">

**Author:** [@Nasirsuave](https://forum.djangoproject.com/u/Nasirsuave)\
**Replies:** 1\
**Last updated:** [June 9, 2026, 1:59am UTC](https://forum.djangoproject.com/t/sessionauthentication-enforcing-csrf-on-action-decorator-when-permission-classes-is-overridden-despite-jwtauthentication-set-on-viewset/45246 "2026-06-09T01:59:32Z")

</div>

Body: Environment: Django 5.x Django REST Framework djangorestframework-simplejwt React (Vite) frontend using JWT Bearer tokens Problem: I have a ModelViewSet with authentication\_classes = \[JWTAuthentication\] set a…

---

## ['mssql' isn't an available database backend or couldn't be imported.](https://forum.djangoproject.com/t/mssql-isnt-an-available-database-backend-or-couldnt-be-imported/45188)

<div class="topic-metadata">

**Author:** [@F2Andy](https://forum.djangoproject.com/u/F2Andy)\
**Replies:** 2\
**Last updated:** [May 27, 2026, 11:09pm UTC](https://forum.djangoproject.com/t/mssql-isnt-an-available-database-backend-or-couldnt-be-imported/45188 "2026-05-27T23:09:06Z")

</div>

I have a Django project that access two databases - one is PostgreSQL and one is MS SQL Server. This was working fine until I upgraded Pythan from 3.12 or 3.13 to 3.14.5. I then have to install the various bits as well, …

---

## [Trying to use django\_scheduled\_tasks, but unable to migrate](https://forum.djangoproject.com/t/trying-to-use-django-scheduled-tasks-but-unable-to-migrate/45139)

<div class="topic-metadata">

**Author:** [@mf2026](https://forum.djangoproject.com/u/mf2026)\
**Replies:** 4\
**Last updated:** [May 21, 2026, 10:54am UTC](https://forum.djangoproject.com/t/trying-to-use-django-scheduled-tasks-but-unable-to-migrate/45139 "2026-05-21T10:54:31Z")

</div>

Hi, I want to run scheduled task on my server, so I try to install django\_scheduled\_tasks: INSTALLED\_APPS = \[ . . . 'django\_scheduled\_tasks', . . . \] but when running python3 manage.py migra…

---

## [Django renovando a sessao a cada carregamento da página](https://forum.djangoproject.com/t/django-renovando-a-sessao-a-cada-carregamento-da-pagina/45054)

<div class="topic-metadata">

**Author:** [@lucasuea](https://forum.djangoproject.com/u/lucasuea)\
**Replies:** 2\
**Last updated:** [May 5, 2026, 1:01pm UTC](https://forum.djangoproject.com/t/django-renovando-a-sessao-a-cada-carregamento-da-pagina/45054 "2026-05-05T13:01:16Z")

</div>

Boa noite, pessoal! Estou em um projeto django e a forma de gravar as sessões é com “BACKEND”: “django.core.cache.backends.redis.RedisCache” Estava analisando os logs as leituras e escritas no redis “monitor” (redis-c…

---

## ['mssql' (also tried 'sql\_server.pyodbc) isn't an available database backend or couldn't be imported](https://forum.djangoproject.com/t/mssql-also-tried-sql-server-pyodbc-isnt-an-available-database-backend-or-couldnt-be-imported/24808)

<div class="topic-metadata">

**Author:** [@Fabi66](https://forum.djangoproject.com/u/Fabi66)\
**Replies:** 4\
**Last updated:** [April 29, 2026, 4:27pm UTC](https://forum.djangoproject.com/t/mssql-also-tried-sql-server-pyodbc-isnt-an-available-database-backend-or-couldnt-be-imported/24808 "2026-04-29T16:27:07Z")

</div>

I have been all over the Internet and read, as well as tried, every post and solution I could find. I cannot find a way to connect to SQL Server 2019. I have installed, uninstalled, reinstalled: mssql-django, django-p…

---

## [dumpdata missing seconds in datetime](https://forum.djangoproject.com/t/dumpdata-missing-seconds-in-datetime/44974)

<div class="topic-metadata">

**Author:** [@rgaiacs](https://forum.djangoproject.com/u/rgaiacs)\
**Replies:** 3\
**Last updated:** [April 24, 2026, 8:49pm UTC](https://forum.djangoproject.com/t/dumpdata-missing-seconds-in-datetime/44974 "2026-04-24T20:49:20Z")

</div>

I’m using the built in dumpdata to export the database from one server. Recently, I noticed that some datatime fields are being exported with a error because the second information is missing. For example, a entry in my a…

---

## [Seemingly random PostgreSQL connection drops while handling Django requests](https://forum.djangoproject.com/t/seemingly-random-postgresql-connection-drops-while-handling-django-requests/19026)

<div class="topic-metadata">

**Author:** [@lukas-slezevicius](https://forum.djangoproject.com/u/lukas-slezevicius)\
**Replies:** 24\
**Last updated:** [April 20, 2026, 6:45am UTC](https://forum.djangoproject.com/t/seemingly-random-postgresql-connection-drops-while-handling-django-requests/19026 "2026-04-20T06:45:38Z")

</div>

For the past few days, our Django website has been experiencing random PostgreSQL connection drops that would raise InterfaceError: connection already closed in random locations. The queries that cause the error occur in…

---

## [Crosstalk in Django Sessions (Two browsers on One Device)](https://forum.djangoproject.com/t/crosstalk-in-django-sessions-two-browsers-on-one-device/44922)

<div class="topic-metadata">

**Author:** [@onyeibo](https://forum.djangoproject.com/u/onyeibo)\
**Replies:** 1\
**Last updated:** [April 16, 2026, 7:22am UTC](https://forum.djangoproject.com/t/crosstalk-in-django-sessions-two-browsers-on-one-device/44922 "2026-04-16T07:22:36Z")

</div>

I am testing an app with two different browsers on my development machine. When I access the same page on the browsers, I notice that browser-A (say Chrome) shows data that browser-B (Firefox) just accessed a second ago…

---

## [always getting mysqlclient error](https://forum.djangoproject.com/t/always-getting-mysqlclient-error/29115)

<div class="topic-metadata">

**Author:** [@jbiddulph](https://forum.djangoproject.com/u/jbiddulph)\
**Replies:** 4\
**Last updated:** [April 3, 2026, 8:06am UTC](https://forum.djangoproject.com/t/always-getting-mysqlclient-error/29115 "2026-04-03T08:06:50Z")

</div>

I’ve uninstalled, reinstalled uninstalled django reinstalled django… I’ve tried everything?! Please help, I’m willing to pay! File “/Users/johnbiddulph/Documents/SITES/py/coastrz/.venv/lib/python3.9/site-packages/djang…

---

## [Emails not getting sent](https://forum.djangoproject.com/t/emails-not-getting-sent/43254)

<div class="topic-metadata">

**Author:** [@F2Andy](https://forum.djangoproject.com/u/F2Andy)\
**Replies:** 2\
**Last updated:** [March 18, 2026, 8:19am UTC](https://forum.djangoproject.com/t/emails-not-getting-sent/43254 "2026-03-18T08:19:20Z")

</div>

I want to use EmailMultiAlternatives to send emails from my Django project, so have set up a little method: EMAIL\_HOST = ‘\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*’ EMAIL\_USE\_TLS = True EMAIL\_HOST\_USER = ‘\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*…

[Next page](https://forum.djangoproject.com/c/users/mystery-errors/22.md?page=1)
