Python Forum
Error while executing makemessages command
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error while executing makemessages command
#1
Hello!
I'm creating multilingual website.

When I try to execute:
$python manage.py makemessages -l de
I get an error:

CommandError: errors happened while running msguniq
msguniq: \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \xabASCII\xbb \u0432 \xabUTF-8\xbb.  msguniq \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 iconv(). \u042d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0431\u0435\u0437 iconv().
From makemessages -v3 I have, that program:
processing file views.py
and then crashes. So, I think that problem is in views:)

views:

@login_required
@require_http_methods(["GET"])
def userprofile(request):
  return render(request, 'userprofile.html', {
    'user': request.user, 
    'form': UserProfileForm(instance=request.user)
  })

@login_required
def insights(request):
  return render_to_response('insights.html', {'client': request.user.client, 'user': request.user})
If I just run this app, everything works fine, but not on makemessages. Should I change somehow this methods to make multilingual site?
Reply
#2
(Jan-04-2018, 10:19 AM)sonic911 Wrote: Hello!
I'm creating multilingual website.

When I try to execute:
$python manage.py makemessages -l de
I get an error:

CommandError: errors happened while running msguniq
msguniq: \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \xabASCII\xbb \u0432 \xabUTF-8\xbb.  msguniq \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 iconv(). \u042d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0431\u0435\u0437 iconv().
From makemessages -v3 I have, that program:
processing file views.py
and then crashes. So, I think that problem is in views:)

views:

@login_required
@require_http_methods(["GET"])
def userprofile(request):
  return render(request, 'userprofile.html', {
    'user': request.user, 
    'form': UserProfileForm(instance=request.user)
  })

@login_required
def insights(request):
  return render_to_response('insights.html', {'client': request.user.client, 'user': request.user})
If I just run this app, everything works fine, but not on makemessages. Should I change somehow these methods to make a multilingual site?

Yes, NameError: name 'login_required' is not defined
Reply
#3
login_required is imported, so I don't need to define it. I found, that problem is that it is impossible to translate block from ascii to UTF-8, because iconv() is not configured(just decoded error's unicode).
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  error while executing pip install mysqlclient kaykay 7 53,339 Mar-15-2019, 03:50 PM
Last Post: neilgomez

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020