Opened 5 years ago

Closed 5 years ago

#29938 closed Bug (wontfix)

"int() argument must be a string or a number, not 'list'" error oracle 12.1 python

Reported by: kono10 Owned by: nobody
Component: Database layer (models, ORM) Version: 1.11
Severity: Normal Keywords: oracle, oracle 12.1, python 2.7
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by kono10)

When creating an initial migration in a new python project "python manage.py migrate" I get the following error int() argument must be a string or a number, not 'list'. I am using an oracle db version 12.1. I was able to fix the error by chancing line 245 in lib/python2.7/site-packages/django/db/backends/oracle/operations.py

from

def fetch_returned_insert_id(self, cursor): 
      return int(cursor._insert_id_var.getvalue())

to

def fetch_returned_insert_id(self, cursor):
        return int(cursor._insert_id_var.getvalue()[0])

Change History (3)

comment:1 by kono10, 5 years ago

Description: modified (diff)

comment:2 by kono10, 5 years ago

Description: modified (diff)

comment:3 by Mariusz Felisiak, 5 years ago

Resolution: wontfix
Status: newclosed

Django 1.11 supports cx_Oracle < 7 (see documentation and ticket #29759). It seems that you're trying to use cx_Oracle >= 7.

Note: See TracTickets for help on using tickets.
Back to Top