Django 마이그레이션 타임즈 오류 int () argument must be a string, a bytes-like object or a number, not'list'

3849 단어 Django
File "manage.py", line 16, in 
    execute_from_command_line(sys.argv)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 200, in handle
    fake_initial=fake_initial,
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/migrations/executor.py", line 117, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/migrations/executor.py", line 250, in apply_migration
    self.recorder.record_applied(migration.app_label, migration.name)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 71, in record_applied
    self.migration_qs.create(app=app, name=name)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/query.py", line 417, in create
    obj.save(force_insert=True, using=self.db)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/base.py", line 729, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/base.py", line 759, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/base.py", line 842, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/base.py", line 880, in _do_insert
    using=using, raw=raw)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/query.py", line 1125, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1287, in execute_sql
    return self.connection.ops.fetch_returned_insert_id(cursor)
  File "/home/jiso/.virtualenvs/TDMS_Env/lib/python3.6/site-packages/django/db/backends/oracle/operations.py", line 228, in fetch_returned_insert_id
    return int(cursor._insert_id_var.getvalue())

이것은 데이터베이스에 새로운 필드를 추가하여migrate 명령을 실행할 때 발생한 오류입니다. 이 오류를 초래한 원인은 당신이 사용한 cx 때문입니다.Oracle 이 드라이버 플러그인의 버전이 너무 높아서 제 것을 참고할 수 있습니다. 제가 사용한 Django는 2.0의 Python3입니다.6.5, cx 대응Oracle 은 6 일 것입니다.X 시리즈의 경우 7.X 시리즈, 빨리 마운트 해제하세요.X 시리즈의

좋은 웹페이지 즐겨찾기