Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Post Timeline

improve post readability
Source Link
markwalker_
  • 13k
  • 7
  • 67
  • 108

django-admin makemessages -l ar

django-admin makemessages -l ar

It givegives this error:

Aside from the error, html.pyhtml.py files are created for each html file. For example: for index.htmlindex.html, an index.html.pyindex.html.py is created with it in the template folder. These html.pyhtml.py files contains just a 'X' and 'B' characters with some text to translate.

I already have a .po.po file for Ar with some text to translate, which I already created 2 months ago, and it's translated perfectly.

django-admin makemessages -l ar

It give this error:

Aside from the error, html.py files are created for each html file. For example: for index.html, an index.html.py is created with it in the template folder. These html.py files contains just a 'X' and 'B' characters with some text to translate.

I already have a .po file for Ar with some text to translate, which I already created 2 months ago, and it's translated perfectly.

django-admin makemessages -l ar

It gives this error:

Aside from the error, html.py files are created for each html file. For example: for index.html, an index.html.py is created with it in the template folder. These html.py files contains just 'X' and 'B' characters with some text to translate.

I already have a .po file for Ar with some text to translate, which I already created 2 months ago, and it's translated perfectly.

django - makemessages command create anresults in html.py file for each html filefiles and give ana UnicodeDecodeError

when iWhen I run this command: django-admin makemessages -l ar it's

django-admin makemessages -l ar

It give this Traceback error:

Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 65, in force_text
s = str(s, encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Ahmed\AppData\Local\Programs\Python\Python36-32\Scripts\django-admin.exe\__main__.py", line 9, in <module>
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\__init__.py", line 371, in execute_from_command_line
utility.execute()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\base.py", line 335, in execute
output = self.handle(*args, **options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 384, in handle
potfiles = self.build_potfiles()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 426, in build_potfiles
self.process_files(file_list)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 522, in process_files
self.process_locale_dir(locale_dir, files)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 590, in process_locale_dir
msgs, errors, status = popen_wrapper(args)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\utils.py", line 23, in popen_wrapper
force_text(output, stdout_encoding, strings_only=True, errors='strict'),
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 69, in force_text
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte. You passed in 

and create anAside from the error, html.py filefiles are created for each html file for exemple . For example: for index.html create, an index.html.py is created with it in the template folder, and this. These html.py files contantcontains just ana 'X' and 'B' characters withewith some text to translate for exemple .

For example:

I already have ana .po file for Ar havewith some text to translate i, which I already created a 2 monthemonths ago, and it's translatetranslated perfectly, but.

But when iI run the makemessagesmakemessages command to add the new text to translate, it give thisgives the above error.

django - makemessages command create an html.py file for each html file and give an UnicodeDecodeError

when i run this command: django-admin makemessages -l ar it's give this Traceback :

Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 65, in force_text
s = str(s, encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Ahmed\AppData\Local\Programs\Python\Python36-32\Scripts\django-admin.exe\__main__.py", line 9, in <module>
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\__init__.py", line 371, in execute_from_command_line
utility.execute()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\base.py", line 335, in execute
output = self.handle(*args, **options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 384, in handle
potfiles = self.build_potfiles()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 426, in build_potfiles
self.process_files(file_list)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 522, in process_files
self.process_locale_dir(locale_dir, files)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 590, in process_locale_dir
msgs, errors, status = popen_wrapper(args)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\utils.py", line 23, in popen_wrapper
force_text(output, stdout_encoding, strings_only=True, errors='strict'),
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 69, in force_text
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte. You passed in 

and create an html.py file for each html file for exemple : index.html create an index.html.py with it in the template folder, and this files contant just an 'X' and 'B' characters withe some text to translate for exemple :

I already have an .po for Ar have some text to translate i already created a 2 monthe ago and it's translate perfectly, but when i run the makemessages command to add the new text to translate it give this error.

makemessages command results in html.py files and a UnicodeDecodeError

When I run this command:

django-admin makemessages -l ar

It give this error:

Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 65, in force_text
s = str(s, encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Ahmed\AppData\Local\Programs\Python\Python36-32\Scripts\django-admin.exe\__main__.py", line 9, in <module>
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\__init__.py", line 371, in execute_from_command_line
utility.execute()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\base.py", line 335, in execute
output = self.handle(*args, **options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 384, in handle
potfiles = self.build_potfiles()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 426, in build_potfiles
self.process_files(file_list)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 522, in process_files
self.process_locale_dir(locale_dir, files)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 590, in process_locale_dir
msgs, errors, status = popen_wrapper(args)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\utils.py", line 23, in popen_wrapper
force_text(output, stdout_encoding, strings_only=True, errors='strict'),
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 69, in force_text
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte. You passed in 

Aside from the error, html.py files are created for each html file. For example: for index.html, an index.html.py is created with it in the template folder. These html.py files contains just a 'X' and 'B' characters with some text to translate.

For example:

I already have a .po file for Ar with some text to translate, which I already created 2 months ago, and it's translated perfectly.

But when I run the makemessages command to add the new text to translate, it gives the above error.

Source Link
D. Ahmed
  • 373
  • 1
  • 4
  • 18

django - makemessages command create an html.py file for each html file and give an UnicodeDecodeError

when i run this command : django-admin makemessages -l ar it's give this Traceback :

Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\utils\encoding.py", line 65, in force_text
s = str(s, encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Ahmed\AppData\Local\Programs\Python\Python36-32\Scripts\django-admin.exe\__main__.py", line 9, in <module>
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\__init__.py", line 371, in execute_from_command_line
utility.execute()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site- packages\django\core\management\base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\base.py", line 335, in execute
output = self.handle(*args, **options)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 384, in handle
potfiles = self.build_potfiles()
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 426, in build_potfiles
self.process_files(file_list)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 522, in process_files
self.process_locale_dir(locale_dir, files)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\commands\makemessages.py", line 590, in process_locale_dir
msgs, errors, status = popen_wrapper(args)
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\core\management\utils.py", line 23, in popen_wrapper
force_text(output, stdout_encoding, strings_only=True, errors='strict'),
File "c:\users\ahmed\appdata\local\programs\python\python36-32\lib\site-packages\django\utils\encoding.py", line 69, in force_text
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3107: invalid continuation byte. You passed in 

and create an html.py file for each html file for exemple : index.html create an index.html.py with it in the template folder, and this files contant just an 'X' and 'B' characters withe some text to translate for exemple :

BBBBBBBB
BBBBB BBBBBBB
 XXXX XXXXXXXXXXXXXXXXXXXXX
 XXXX XXXXXXXXX XXXXX XXX
 XXXX XXXXXXXXXXXXXXXXXX
 XXXX XXXXXXXXXXXXX
 XXXX XXXXXXXXXXXXXXXXXX XX
 XXX XXXXXXXXXXXXXX gettext(u'Les appels à projet') XXXXX
 XXXX XXXXXXXXXXXXXXXXXXXXXXXXXX
 XXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
 XXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXX XXXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXX
 XXXXXX
 XXXXXX
 XXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX
 XXXX XXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX
 XXXXXXX
 XXXX
 XXXX gettext(u'Appel à projet') XXXXX
 XXXX gettext(u'Date de lencement') XXXXX
 XXXX gettext(u'Date de clature') XXXXX
 XXXX gettext(u'Année budjitaire') XXXXX
 XXXX gettext(u"N° d'apppel à projet") XXXXX
 XXXX gettext(u"Etat d'appel") XXXXX
 XXXX XXXX gettext(u'Action') XXXXX XXX
 XXXXX
 XXXXXXXX
 XXXXXXX
 BBB BBBBBB BB BBBBBBBBBBB
 XXXX
 XXXXXXXXX
 XXXXXXXXX
 XXXXXXXXX

I already have an .po for Ar have some text to translate i already created a 2 monthe ago and it's translate perfectly, but when i run the makemessages command to add the new text to translate it give this error.

Any ideas please ?

lang-py

AltStyle によって変換されたページ (->オリジナル) /