小编D. *_*med的帖子

makemessages 命令导致 html.py 文件和 UnicodeDecodeError

当我运行此命令时:

django-admin makemessages -l ar
Run Code Online (Sandbox Code Playgroud)

它给出了这个错误:

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 …
Run Code Online (Sandbox Code Playgroud)

python django localization internationalization makemessages

6
推荐指数
1
解决办法
843
查看次数

如何使用 excelJs 设置导出文件的标题样式

如何自定义样式,如边框、颜色、宽度等,在 excelJs 中创建标题?

我可以设置表格行的样式,但不能设置标题

  fDay = days[0].charAt(0)
  sDay = days[1].charAt(0)
  sheet.columns = [
    {header: 'Num', key: 'id'},
    {header: 'Nom prenom', key: 'name'},
    {header: 'Date de naissance', key: 'birthday'},
    {header: fDay+'1', key: fDay+'1', style: {border: 'thin'}},
    {header: sDay+'1', key: sDay+'1'},
    {header: fDay+'2', key: fDay+'2'},
    {header: sDay+'2', key: sDay+'2'},
    {header: fDay+'3', key: fDay+'3'},
    {header: sDay+'3', key: sDay+'3'},
    {header: fDay+'4', key: fDay+'4'},
    {header: sDay+'4', key: sDay+'4'},
    {header: fDay+'5', key: fDay+'5'},
    {header: sDay+'5', key: sDay+'5'},
  ]
  $.each(dataPlayers, (index, player)=>{
    row = sheet.addRow({id: player.id, name: …
Run Code Online (Sandbox Code Playgroud)

javascript node.js exceljs

3
推荐指数
1
解决办法
8328
查看次数