I'm running the same script over the same flat file that inserts data into the same app and same MySQL server for 3 different projects. Two of the projects print warning messages when bad data is encountered: /usr/local/lib/python2.5/site-packages/django/db/models/base.py:238: Warning: Data truncated for column 'my_field' at row 1 db_values + self._meta.pk.get_db_prep_lookup('exact', pk_val)
The other project raises an exception: Traceback (most recent call last): File "myscript.py", line 417, in <module> listing_list.extend(parse_residential(filepath)) File "myscript.py", line 286, in parse_residential this_listing = parse_listing(filepath, filename,'R',row) File "/myscript.py", line 191, in parse_listing this_listing.save() File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py", line 238, in save db_values + self._meta.pk.get_db_prep_lookup('exact', pk_val)) File "/usr/local/lib/python2.5/site-packages/django/db/backends/util.py", line 18, in execute return self.cursor.execute(sql, params) File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 168, in execute if not self._defer_warnings: self._warning_check() File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 82, in _warning_check warn(w[-1], self.Warning, 3) File "/usr/lib/python2.5/warnings.py", line 62, in warn globals) File "/usr/lib/python2.5/warnings.py", line 102, in warn_explicit raise message _mysql_exceptions.Warning: Data truncated for column 'my_field' at row 1 What is causing the different behavior and how do I make them all not raise exceptions for MySQL warnings? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---