Django migrate error : TypeError expected string or bytes-like object

  Django

Email

                    PS C:UsersnaikADesktopelearingelearningsigma> python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, dqsadmin, login, register, sessions
Running migrations:
Applying dqsadmin.0009_mainmenu_currentdate…Traceback (most recent call last):
File “manage.py”, line 15, in <module>
execute_from_command_line(sys.argv)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangocoremanagement__init__.py”, line 381, in execute_from_command_line
utility.execute()
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangocoremanagement__init__.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangocoremanagementbase.py”, line 316, in run_from_argv
self.execute(*args, **cmd_options)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangocoremanagementbase.py”, line 353, in execute
output = self.handle(*args, **options)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangocoremanagementbase.py”, line 83, in wrapped
res = handle_func(*args, **kwargs)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangocoremanagementcommandsmigrate.py”, line 203, in handle
fake_initial=fake_initial,
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmigrationsexecutor.py”, line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmigrationsexecutor.py”, line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmigrationsexecutor.py”, line 244, in apply_migration
state = migration.apply(state, schema_editor)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmigrationsmigration.py”, line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmigrationsoperationsfields.py”, line 84, in database_forwards
field,
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbbackendsbaseschema.py”, line 421, in add_field
definition, params = self.column_sql(model, field, include_default=True)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbbackendsbaseschema.py”, line 168, in column_sql
default_value = self.effective_default(field)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbbackendsbaseschema.py”, line 239, in effective_default
return field.get_db_prep_save(default, self.connection)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmodelsfields__init__.py”, line 790, in get_db_prep_save
return self.get_db_prep_value(value, connection=connection, prepared=False)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmodelsfields__init__.py”, line 1273, in get_db_prep_value
value = self.get_prep_value(value)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmodelsfields__init__.py”, line 1268, in get_prep_value
return self.to_python(value)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangodbmodelsfields__init__.py”, line 1230, in to_python
parsed = parse_date(value)
File “C:UsersnaikAAppDataLocalProgramsPythonPython37-32libsite-packagesdjangoutilsdateparse.py”, line 74, in parse_date
match = date_re.match(value)
TypeError: expected string or bytes-like object

Spread the Code

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
anil naik Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
newest oldest most voted
Notify of