我试图在基于Flask框架的python应用程序中使用Flask-Babel模块,该应用程序的名称为pywebdriver,这是Odoo中经常使用的服务器来管理POS设备(打印机,电子秤...) 。 当我尝试将其作为服务启动时,显示此错误消息:
● pywebdriver.service - Pywebdriver
Loaded: loaded (/lib/systemd/system/pywebdriver.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since ج 2018-06-29 16:52:25 CET; 2min 32s ago
Process: 1217 ExecStart=/usr/bin/python /usr/bin/pywebdriverd (code=exited, status=1/FAILURE)
Main PID: 1217 (code=exited, status=1/FAILURE)
يون 29 16:52:24 rachid-EIBD-NCE systemd[1]: pywebdriver.service: Unit entered failed state.
يون 29 16:52:24 rachid-EIBD-NCE systemd[1]: pywebdriver.service: Failed with result 'exit-code'.
يون 29 16:52:25 rachid-EIBD-NCE systemd[1]: pywebdriver.service: Service hold-off time over, scheduling restart
يون 29 16:52:25 rachid-EIBD-NCE systemd[1]: Stopped Pywebdriver.
يون 29 16:52:25 rachid-EIBD-NCE systemd[1]: pywebdriver.service: Start request repeated too quickly.
يون 29 16:52:25 rachid-EIBD-NCE systemd[1]: Failed to start Pywebdriver.
使用服务器的解压缩版本并尝试手动启动它后,出现此消息:
Traceback (most recent call last):
File "pywebdriverd", line 3, in <module>
from pywebdriver import app, config, drivers
File "/usr/lib/python2.7/dist-packages/pywebdriver/__init__.py", line 33, in <module>
from flask.ext.babel import Babel
ImportError: No module named ext.babel
谢谢。