Monday, April 25, 2016

Re: A Problem about UnicodeEncodeError

Thank you for your help.
But my project is not in the desktop folder.
I'll show you the traceback information:



在 2016年4月24日星期日 UTC+8下午12:56:26,Mike Dewhirst写道:
On 24/04/2016 1:48 PM, nku...@gmail.com wrote:
> Yeah,this problem is same as what I met.
> However the solution the author provided didn't work on my machine.
> My friend started the project successfully with python2.x,so I decided
> to change the version of python.
> Thank you very much for your help!
>
> 在 2016å¹´4月22日星期äº" UTC+8ä¸‹å ˆ10:41:29,Steven Crockett写é ":
>
>     Hi. Could you post more of the exception traceback?
>
>     Here is a workaround others have found for a problem similar to yours:
>     https://code.djangoproject.com/ticket/23704
>     <https://code.djangoproject.com/ticket/23704>

If you look at the path displayed in that ticket and pointed to by the
little blue arrow, you can see the Django project ("myfirstapp") is
created in the desktop folder.

I believe that is the problem. The desktop is a magic place in Windows
and I have no doubt that Microsoft uses "special" characters in the path
so it recognises the desktop to perform its magic.

It is probably mis-recognised by Python as a 'mbcs' encoding and causes
the error.

I have been using Python 2 and 3 on Windows for years without problems -
which knowing Microsoft I consider to be something of a miracle!

Move your project off the desktop and you won't need any workarounds.

Mike

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8a4c6412-78ff-453c-9bf7-8fda2f5ab127%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment