Django 4.1 compatibility with cx_oracle 7.3

In the Django docs Databases section for release 4.1 it’s stated that cx_oracle versions 7.0 and above are supported. I’m using cx_oracle version 7.3 and getting the below error.

This happened after I upgraded from Django v3.2. DB_TYPE_DATE is an attribute in cx_oracle that was added in version 8.0 so does Django 4.1 not actually support cx_oracle 7.3 or is there some configuration that I’ve missed?

I’m confused.

You wrote:

That implies to me that DB_TYPE_DATE wouldn’t be present in cx_oracle 7.3.

What am I missing here?

I also don’t see DB_TYPE_DATE in the docs at Module Interface — cx_Oracle 7.3.0 documentation, but it is listed at Module Interface — cx_Oracle 8.0.0 documentation

Yes DB_TYPE_DATE doesn’t exist in cx_oracle 7.3. I’m not sure why Django is trying to access it.

Django 4.1 claims to work with cx_oracle 7.0 and higher. Databases | Django documentation | Django

Please verify that you are running Django 4.1. The line 20 in in the most current 4.1 (4.1.13) is:

    if self.connection.cx_oracle_version < (8,):

Digging through the code, that line in your traceback doesn’t exist at line 20 until version 5.

1 Like

Thanks heaps it was using Django 5.0 due to two conflicting requirements files.