still having problems running the tutorial..

2006-03-21 Thread [EMAIL PROTECTED]

no matter what i do.. no matter what collations i try..

i keep getting this error when i try to create a super user..

i have tried this a few times, and tried everything that has been
posted... but i cannot get it to run..

it is already too late in the game to try to use django on a current
project, but i am hoping i can get it running for a future project..

anyway... here's what i am getting..

any help is appreciated.. thanks!

Traceback (most recent call last):
  File "manage.py", line 11, in ?
execute_manager(settings)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 1051, in execute_manager
execute_from_command_line(action_mapping)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 969, in execute_from_command_line
action_mapping[action]()
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 561, in createsuperuser
u = users.create_user(username, email, password)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/models/auth.py",
line 204, in _module_create_user
user.save()
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1025, in method_save
','.join(placeholders)), db_values)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/base.py",
line 10, in execute
result = self.cursor.execute(sql, params)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/backends/mysql.py",
line 32, in execute
return self.cursor.execute(sql, params)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/cursors.py",
line 137, in execute
self.errorhandler(self, exc, value)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/connections.py",
line 33, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1048, "Column 'username' cannot be
null")
sergio-ruizs-Computer-5:~/sites/djangoPoll/myproject sergioruiz$ python
manage.py createsuperuser
Username (only letters, digits and underscores): check
Traceback (most recent call last):
  File "manage.py", line 11, in ?
execute_manager(settings)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 1051, in execute_manager
execute_from_command_line(action_mapping)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 969, in execute_from_command_line
action_mapping[action]()
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management.py",
line 529, in createsuperuser
users.get_object(username__exact=username)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/utils/functional.py",
line 3, in _curried
return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1355, in function_get_object
obj_list = function_get_list(opts, klass, **kwargs)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1395, in function_get_list
return list(function_get_iterator(opts, klass, **kwargs))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta/__init__.py",
line 1378, in function_get_iterator
cursor.execute("SELECT " + (kwargs.get('distinct') and "DISTINCT "
or "") + ",".join(select) + sql, params)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/base.py",
line 10, in execute
result = self.cursor.execute(sql, params)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/db/backends/mysql.py",
line 32, in execute
return self.cursor.execute(sql, params)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/cursors.py",
line 137, in execute
self.errorhandler(self, exc, value)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/MySQLdb/connections.py",
line 33, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1267, "Illegal mix of collations
(latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,C

Re: still having problems running the tutorial..

2006-03-21 Thread [EMAIL PROTECTED]

[EMAIL PROTECTED] wrote:

> no matter what i do.. no matter what collations i try..

> _mysql_exceptions.OperationalError: (1267, "Illegal mix of collations
> (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for
> operation '='")

"Illegal mix of collations" gives ~67000 hits on google, so it's
obviously a rather  common problem.  I cannot seem to find anydefinite
solution, though...  but knowing a little more about your setup might
help:

- what mysql version are you using ?

- are you running your own mysql daemon?  what happens if you run it
with the option "--default-character-set=utf8" ?  (alternatively, you
can use the "default-character-set" setting in the option file)

- can you check if the table definitions contain any DEFAULT CHARSET
clauses ?  if so, what do they look like ?




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: still having problems running the tutorial..

2006-03-22 Thread [EMAIL PROTECTED]

okay, i finally got this fixed..

what i had to do was..

create the database using utf-8 collation from the very beginning.. and
not try to convert it.. for some reason, when i try to convert it, it
would not convert all the tables..

thanks for your help!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---