You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a new model, nothing strange, some ForeignKey to CharField is the strangest.
When I try to migrate, this error is shown:
File "manage.py", line 18, in
execute_from_command_line(sys.argv)
File "/project_folder/venv3/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/project_folder/venv3/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/project_folder/venv3/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/project_folder/venv3/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/project_folder/venv3/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/project_folder/venv3/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 203, in handle
fake_initial=fake_initial,
File "/project_folder/venv3/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 "/project_folder/venv3/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 "/project_folder/venv3/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/project_folder/venv3/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 106, in exit
self.execute(sql)
File "/project_folder/venv3/lib/python3.6/site-packages/sql_server/pyodbc/schema.py", line 642, in execute
sql = str(sql)
File "/project_folder/venv3/lib/python3.6/site-packages/django/db/backends/ddl_references.py", line 175, in str
return self.template % self.parts
File "/project_folder/venv3/lib/python3.6/site-packages/django/db/backends/ddl_references.py", line 91, in str
return ', '.join(col_str(column, idx) for idx, column in enumerate(self.columns))
File "/project_folder/venv3/lib/python3.6/site-packages/django/db/backends/ddl_references.py", line 91, in
return ', '.join(col_str(column, idx) for idx, column in enumerate(self.columns))
File "/project_folder/venv3/lib/python3.6/site-packages/django/db/backends/ddl_references.py", line 87, in col_str
return self.quote_name(column) + self.col_suffixes[idx]
File "/project_folder/venv3/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 136, in quote_name
return self.connection.ops.quote_name(name)
File "/project_folder/venv3/lib/python3.6/site-packages/sql_server/pyodbc/operations.py", line 246, in quote_name
if name.startswith('[') and name.endswith(']'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
A you can see, I am using django 2.1.5 and python 3.6
The text was updated successfully, but these errors were encountered:
I'm trying to create a new model, nothing strange, some ForeignKey to CharField is the strangest.
When I try to migrate, this error is shown:
A you can see, I am using django 2.1.5 and python 3.6
The text was updated successfully, but these errors were encountered: