Hi Hans Shih,

This is a very common problem. The short answer is that the locale is not
set properly on your server. If you search this mailing list for locale,
you will find lots of other occurrences of this.

You have two options:

1. (Adequate) The quick and dirty option would be to find every instance of
0xe9, ý, and replace them. You may have to find other unicode characters
and replace them.

2. (Correct) Set up your locales properly. I use the included fabfile.py to
automate this. Start by reading
http://mezzanine.jupo.org/docs/deployment.html. The relevant part of the
fabfile is at
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L346-L350.
That should sort you.

best,
ken


On Thu, Mar 20, 2014 at 9:24 AM, Hans Shih <[email protected]> wrote:
>
> I wanna move my blog to mezzanine, but I got this "UnicodeDecodeError:
'ascii' codec can't decode byte 0xe9 in position 3: ordinal not in
range(128)"
>
>
===============================================================================
>
>  sudo python manage.pimport_blogger --mezzanine-user=username
--blogger-id=(my blog_id)
>
> /usr/lib64/python2.7/site-packages/mezzanine/utils/conf.py:51:
UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django
1.5 requires. Will fall back to the domains configured as sites.
>
>   warn("You haven't defined the ALLOWED_HOSTS settings, which "
>
> /usr/lib64/python2.7/site-packages/mezzanine/utils/conf.py:59:
UserWarning: TIME_ZONE setting is not set, using closest match: UTC
>
>   warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
>
> /usr/lib/python2.7/site-packages/gdata/gauth.py:63: DeprecationWarning:
django.utils.simplejson is deprecated; use json instead.
>
>   from django.utils import simplejson
>
>
> Traceback (most recent call last):
>
>   File "manage.py", line 29, in <module>
>
>     execute_from_command_line(sys.argv)
>
>   File
"/usr/lib64/python2.7/site-packages/django/core/management/__init__.py",
line 399, in execute_from_command_line
>
>     utility.execute()
>
>   File
"/usr/lib64/python2.7/site-packages/django/core/management/__init__.py",
line 392, in execute
>
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>
>   File
"/usr/lib64/python2.7/site-packages/django/core/management/base.py", line
242, in run_from_argv
>
>     self.execute(*args, **options.__dict__)
>
>   File
"/usr/lib64/python2.7/site-packages/django/core/management/base.py", line
285, in execute
>
>     output = self.handle(*args, **options)
>
>   File
"/usr/lib64/python2.7/site-packages/mezzanine/blog/management/base.py",
line 167, in handle
>
>     self.handle_import(options)
>
>   File
"/usr/lib64/python2.7/site-packages/mezzanine/blog/management/commands/import_blogger.py",
line 65, in handle_import
>
>     pub_date=published_date, tags=tags)
>
>   File
"/usr/lib64/python2.7/site-packages/mezzanine/blog/management/base.py",
line 65, in add_post
>
>     title = decode_entities(title)
>
>   File "/usr/lib64/python2.7/site-packages/mezzanine/utils/html.py", line
38, in decode_entities
>
>     return re.sub("&#?\w+;", decode, html.replace("&amp;", "&"))
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 3:
ordinal not in range(128)
>
> [ec2-user@ip-172-31-18-87 myproject]$
>
>
===============================================================================
>
> How to fix it?
>
> --
> You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to