Did you install mysql-python? If not, you can find it on Sourceforge. On Sat, Mar 17, 2012 at 10:49 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
> Hello All, > I was developing a website and the development was all done using sqlite > database. Now the development is almost complete so i need to test the site > using mysql. When i did a syncdb on a fresh database i got the following > error: > > Traceback (most recent call last): > File "./manage.py", line 19, in <module> > execute_manager(settings) > File > "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", > line 438, in execute_manager > utility.execute() > File > "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", > line 220, in execute > output = self.handle(*args, **options) > File > "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", > line 351, in handle > return self.handle_noargs(**options) > File > "/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > line 109, in handle_noargs > emit_post_sync_signal(created_models, verbosity, interactive, db) > File > "/usr/local/lib/python2.7/site-packages/django/core/management/sql.py", > line 190, in emit_post_sync_signal > interactive=interactive, db=db) > File > "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 172, in send > response = receiver(signal=self, sender=sender, **named) > File > "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > line 51, in create_permissions > content_type=ctype > File > "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line > 138, in create > return self.get_query_set().create(**kwargs) > File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", > line 360, in create > obj.save(force_insert=True, using=self.db) > File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", > line 460, in save > self.save_base(using=using, force_insert=force_insert, > force_update=force_update) > File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", > line 553, in save_base > result = manager._insert(values, return_id=update_pk, using=using) > File > "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line > 195, in _insert > return insert_query(self.model, values, **kwargs) > File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", > line 1436, in insert_query > return query.get_compiler(using=using).execute_sql(return_id) > File > "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", > line 791, in execute_sql > cursor = super(SQLInsertCompiler, self).execute_sql(None) > File > "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", > line 735, in execute_sql > cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", line > 34, in execute > return self.cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", > line 86, in execute > return self.cursor.execute(query, args) > File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 176, > in execute > if not self._defer_warnings: self._warning_check() > File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 92, > in _warning_check > warn(w[-1], self.Warning, 3) > _mysql_exceptions.Warning: Data truncated for column 'name' at row 1 > > > As you can see its a mysql warning since i had changed mysql mode to non > strict. The error from the traceback looks to be from the > file > "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py" > which is django contrib application. What should i do to fix this issue. Am > using django version 1.3.1. Please help. > > Thanks and Regards, > > Swaroop Shankar V > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.