Python3 Odoo TypeError sys.print不是函数

问题描述 投票:0回答:2

我刚刚设置了Odoo的全新安装(没有自定义插件/模块),并且在创建数据库后,我在主页上看到此错误:


The style compilation failed, see the error below. Your recent actions may be the cause, please try reverting the changes you made.

(b'', b'TypeError: sys.print is not a function
    at /usr/lib/nodejs/less/bin/lessc:384:25
    at tree.importVisitor.finish [as _finish] (/usr/lib/nodejs/less/lib/less/parser.js:669:28)
    at tree.importVisitor.run (/usr/lib/nodejs/less/lib/less/import-visitor.js:25:22)
    at Object.parse (/usr/lib/nodejs/less/lib/less/parser.js:675:22)
    at parseLessFile (/usr/lib/nodejs/less/bin/lessc:345:12)
    at Socket. (/usr/lib/nodejs/less/bin/lessc:407:9)
    at Socket.emit (events.js:228:7)
    at endReadableNT (_stream_readable.js:1185:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
')This error occured while compiling the bundle 'web.assets_common' containing:
    - /web/static/lib/bootstrap/less/variables.less
    ....

经过Google的一些研究,我已经尝试过:

  • 将nodejs链接到/ usr / bin中的节点

  • 重新安装node-js,less-js,uglify-js

  • 重新安装所有pip3 Odoo要求

  • 每次尝试后删除我的数据库

  • 降级至1.3.3

我的版本:

NodeJs v12.14.1

Npm 6.13.4

[email protected]

[email protected]

正如我所见,这不是一个常见的错误,并且在这种情况下没有很好的记录。有人看过类似的东西吗?

python node.js less odoo
2个回答
0
投票

最近我在Ubuntu 18.04上使用Odoo 11遇到了类似的错误,我在apt install node-less上安装的次数较少(安装了lessc 1.6.3)。改为使用npm install -g less进行更少的安装(npm 6.13.4,nodejs 12.16.1,它安装了lessc 3.11.1)使它可以工作。

奇怪的是,您声明您已经拥有lessc 3.11.1。也许尝试完全删除并使用npm进行安装。


0
投票

从引导程序安装推荐的构建依赖项,

命令-npm install -g少了jshint缩略uglify-js

谢谢

© www.soinside.com 2019 - 2024. All rights reserved.