[Django] #32026: AttributeError: 'tuple' object has no attribute 'startswith'

4 views
Skip to first unread message

Django

unread,
Sep 21, 2020, 11:18:03 AM9/21/20
to django-...@googlegroups.com
#32026: AttributeError: 'tuple' object has no attribute 'startswith'
-------------------------------------+-------------------------------------
Reporter: | Owner: (none)
315xiaoyao |
Type: Bug | Status: new
Component: Error | Version: 3.1
reporting | Keywords: AttributeError:
Severity: Release | 'tuple' object has no attribute
blocker | 'startswith'
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
manage.py@dev > migrate
ssh://ro...@10.32.109.197:22/proj/env/bin/python3 -u
/root/.pycharm_helpers/pycharm/django_manage.py migrate /proj/app/mysite
File tracking disabled
Operations to perform:
Apply all migrations: admin, auth, cmdb, contenttypes, sessions
Running migrations:
Applying cmdb.0001_initial...Traceback (most recent call last):
File "/root/.pycharm_helpers/pycharm/django_manage.py", line 59, in
<module>
run_command()
File "/root/.pycharm_helpers/pycharm/django_manage.py", line 46, in
run_command
run_module(manage_file, None, '__main__', True)
File "/usr/local/python3/lib/python3.8/runpy.py", line 207, in
run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/local/python3/lib/python3.8/runpy.py", line 97, in
_run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/local/python3/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/proj/app/mysite/manage.py", line 22, in <module>
main()
File "/proj/app/mysite/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/proj/env/lib/python3.8/site-
packages/django/core/management/__init__.py", line 401, in
execute_from_command_line
utility.execute()
File "/proj/env/lib/python3.8/site-
packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/proj/env/lib/python3.8/site-
packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/proj/env/lib/python3.8/site-
packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/proj/env/lib/python3.8/site-
packages/django/core/management/base.py", line 85, in wrapped
res = handle_func(*args, **kwargs)
File "/proj/env/lib/python3.8/site-
packages/django/core/management/commands/migrate.py", line 243, in handle
post_migrate_state = executor.migrate(
File "/proj/env/lib/python3.8/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 "/proj/env/lib/python3.8/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 "/proj/env/lib/python3.8/site-
packages/django/db/migrations/executor.py", line 227, in apply_migration
state = migration.apply(state, schema_editor)
File "/proj/env/lib/python3.8/site-
packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state,
project_state)
File "/proj/env/lib/python3.8/site-
packages/django/db/migrations/operations/models.py", line 92, in
database_forwards
schema_editor.create_model(model)
File "/proj/env/lib/python3.8/site-
packages/django/db/backends/base/schema.py", line 322, in create_model
sql, params = self.table_sql(model)
File "/proj/env/lib/python3.8/site-
packages/django/db/backends/base/schema.py", line 195, in table_sql
'table': self.quote_name(model._meta.db_table),
File "/proj/env/lib/python3.8/site-
packages/django/db/backends/base/schema.py", line 145, in quote_name
return self.connection.ops.quote_name(name)
File "/proj/env/lib/python3.8/site-
packages/django/db/backends/mysql/operations.py", line 176, in quote_name
if name.startswith("`") and name.endswith("`"):
AttributeError: 'tuple' object has no attribute 'startswith'

The following error will be reported as soon as the new environment is
submitted (migrate). Please solve it, thank you very much!

--
Ticket URL: <https://code.djangoproject.com/ticket/32026>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 21, 2020, 12:15:28 PM9/21/20
to django-...@googlegroups.com
#32026: AttributeError: 'tuple' object has no attribute 'startswith'
-------------------------------------+-------------------------------------
Reporter: 315xiaoyao | Owner: (none)
Type: Bug | Status: closed
Component: Error reporting | Version: 3.1
Severity: Release blocker | Resolution: duplicate
Keywords: AttributeError: | Triage Stage:
'tuple' object has no attribute | Unreviewed
'startswith' |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => duplicate


Comment:

Duplicate of #32024.

--
Ticket URL: <https://code.djangoproject.com/ticket/32026#comment:1>

Reply all
Reply to author
Forward
0 new messages