-2

I have two views that spawn these messages in sudo systemctl status gunicorn:

gunicorn:

Nov 07 10:46:36 mysite gunicorn[2107]:     cleansed = [self.cleanse_setting("", v) for v in value]
Nov 07 10:46:36 mysite gunicorn[2107]:   File "/home/mysite/anaconda3/envs/mysite/lib/python3.10/site-packages/django/views/debug.py", line 135, in cleanse_setting

The whole site works, but any view.py that accesses a certain class spawn these errors. The views were totally working with no problem.

I added 4 fields to the class's 'models.py' then removed them and migrated the database with:

python manage.py makemigrations
python manage.py migrate

After that, the error started to show.

How can I resolve this?

6
  • 1
    What is the exact Django version you use? Commented Nov 7 at 11:07
  • 1
    Did you by any chance have a setting my_setting = []; my_setting.append(my_setting) Commented Nov 7 at 11:09
  • 1
    N.B.: opened a ticket for this: code.djangoproject.com/ticket/36716#ticket Commented Nov 7 at 11:17
  • Minus one for lack of responsiveness. Commented Nov 7 at 12:35
  • @willeM_VanOnsem thank you so much, the Django version was 5.0.3, I upgraded it to 5.2.8, I also upgraded postgresql from 12 to 14, now the error changed to "Invalid templates library specified". That's why I was late in my response, apologies Commented Nov 8 at 5:46

1 Answer 1

0

The problem was resolved, there was nothing wrong with the 'settings.py', but a database field that conflicted with the previous migrations. Once I filled the field with data, the error stopped and the django site worked fully.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for posting your solution. Do you have any test automation around your software? That would likely have caught the errant database field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.