Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncdb errors #7

Open
GoogleCodeExporter opened this issue Apr 21, 2016 · 1 comment
Open

syncdb errors #7

GoogleCodeExporter opened this issue Apr 21, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Environment: Snow Leopard with all latest updates
* default python
* django trunk installed
* python imaging library installed
* sample_project trunk with settings.py edited to point to database server and 
secret key added

What steps will reproduce the problem?
python manage.py syncdb

What is the expected output? 
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 312 object(s) from 2 fixture(s)

What do you see instead?
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_admin_log
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table contactinfo_locationtype
Creating table contactinfo_location
Creating table contactinfo_address
Creating table contactinfo_phone
Creating table country
Creating table usstate
Creating table crm_contact_locations
Creating table crm_contact_business_types
Creating table crm_contact
Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    execute_manager(settings)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/commands/syncdb.py", line 97, in handle_noargs
    cursor.execute(statement)
  File "/Users/nilesh/Documents/svn/djtrunk/django/db/backends/util.py", line 15, in execute
    return self.cursor.execute(sql, params)
  File "/Users/nilesh/Documents/svn/djtrunk/django/db/backends/mysql/base.py", line 86, in execute
    return self.cursor.execute(query, args)
  File "build/bdist.macosx-10.6-universal/egg/MySQLdb/cursors.py", line 176, in execute
  File "build/bdist.macosx-10.6-universal/egg/MySQLdb/cursors.py", line 92, in _warning_check
_mysql_exceptions.Warning: Converting column 'picture' from VARCHAR to TEXT

Original issue reported on code.google.com by lvnil...@gmail.com on 2 Oct 2010 at 10:49

@GoogleCodeExporter
Copy link
Author

jcd 2010/11/22.
I ran into this error on OS/X 10.5.8.
Take a look at crm/models.py.  Look at this line:

picture = models.ImageField(null=True, blank=True, max_length=1048576, 
upload_to="picture/profile/")

max_length defaults to 100.  I believe this is the storage allocated to the 
filename.  It's unreasonable to set this to 1048576!

I tried removing this parameter - letting it default to 100.  Now syncdb works 
fine.



Original comment by jdean...@gmail.com on 22 Nov 2010 at 5:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant