`TypeError: argument 2 must be a join, cursor, or None` in Psycopg2 with Django on Heroku

I have a heroku pipeline, and I just turned on the application overview for it. It uses the same code base as my internships and production applications, the same settings files and that’s it.

When the verification application is deployed, it can connect to the created database and perform migrations. When I try to connect to the application in the browser, I get

`TypeError: argument 2 must be a connection, cursor or None` in `psycopg2/_json.py, register_json:139`

Top of stack:

`django.contrib.sites.models._get_site_by_id`.

I have connected the Opbeat output of the error frame at the bottom of this post.

The settings file is linked.

When I install DEBUG=True, everything works fine. What may seem like a problem ALLOWED_HOSTS, but when I installed ALLOWED_HOSTSin '*'with DEBUG=False, are there still errors?

? , .

error frame

+4

Source: https://habr.com/ru/post/1658986/


All Articles