小编And*_*rov的帖子

Django makemessages“struct.error:解包需要 4 个字节的缓冲区”

我有一个 django 实例打包在 docker-compose 中的 Docker 容器中。

我正在尝试为项目生成 makemessages 文件,但是当我尝试运行 makemessages 时,这就是我收到的响应

root@6fc510c9c5d1:/code# python manage.py makemessages
/usr/local/lib/python3.6/dist-packages/daphne/server.py:12: UserWarning: Something has already installed a non-asyncio Twisted reactor. Attempting to uninstall it; you can fix this warning by importing daphne.server early in your codebase or finding the package that imports Twisted and importing it later on.
  UserWarning,
Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 347, in execute …
Run Code Online (Sandbox Code Playgroud)

python django gettext docker makemessages

7
推荐指数
1
解决办法
4129
查看次数

标签 统计

django ×1

docker ×1

gettext ×1

makemessages ×1

python ×1