Re: BUG:can't createsuperuser??

151 views
Skip to first unread message

mugisha moses

unread,
Jan 16, 2013, 9:09:46 AM1/16/13
to django-d...@googlegroups.com
http://www.joelonsoftware.com/articles/Unicode.html

On Wed, Jan 16, 2013 at 12:51 PM, zhfisher <zhangw...@gmail.com> wrote:
Django version=1.5 rc1
Database:mySQL


E:\Work\Code\Django\SaleTools>manage.py createsuperuser
D:\Python27\lib\site-packages\django\utils\hashcompat.py:9: DeprecationWarning:
django.utils.hashcompat is deprecated; use hashlib instead
  DeprecationWarning)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordin
al not in range(128)


In pycharm 2.6:

   Usage: E:\Work\Code\Django\SaleTools\manage.py createsuperuser [options] 

Used to create a superuser.

E:\Work\Code\Django\SaleTools\manage.py: error: no such option: --username



Whether this is a bug?



--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/2eNvneWMRAgJ.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.

Florian Apolloner

unread,
Jan 16, 2013, 10:27:34 AM1/16/13
to django-d...@googlegroups.com
Hi zhfisher,


On Wednesday, January 16, 2013 10:51:17 AM UTC+1, zhfisher wrote:
Django version=1.5 rc1
Database:mySQL

E:\Work\Code\Django\SaleTools>manage.py createsuperuser
D:\Python27\lib\site-packages\django\utils\hashcompat.py:9: DeprecationWarning:
django.utils.hashcompat is deprecated; use hashlib instead
  DeprecationWarning)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordin
al not in range(128)

Can you tell me what exactly you executed? just manage.py createsuperuser and did it fail immediately or  after you entered the username?
 
In pycharm 2.6:

I can't tell you what pycharm does, according to the docs it is certainly supported: https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-createsuperuser and works for me.

Thx,
Florian

Florian Apolloner

unread,
Jan 16, 2013, 10:36:01 AM1/16/13
to django-d...@googlegroups.com
Hi Mugisha Moses,

On Wednesday, January 16, 2013 3:09:46 PM UTC+1, Mugisha Moses wrote:
http://www.joelonsoftware.com/articles/Unicode.html

While you surely wanted to be helpful, a link like this isn't really helping to solve the problem. Given the fact that the user is on windows and we mostly (or rather exclusively) test on Linux it's certainly possible that Windows is doing something stupid or the locale/sys information doesn't allow us to determine the encoding correctly and we have indeed a bug there.

Your link (at least to me) might suggest that it's completely the fault of the user and might be a bit discouraging to newcomers. If it's all that clear to you please try to include a few words to accompany the link and maybe even try to explain what he can do to fix this error.

Best regards,
Florian
Reply all
Reply to author
Forward
0 new messages