python - Mac 上安装 Odoo 无法执行命令 LESSC

标签 python macos postgresql odoo

所以我有一台运行 10.11.4 (El Capitan) 的 mac。

我遵循了本教程:http://kiattipong.blogspot.com/2015/05/setup-odoo-development-on-os-x-with.html?showComment=1459570104589 .实际上,我也将我遇到的问题发布到了该博客的评论部分。

一切顺利,直到我遇到一些安装错误(找不到文件)的要求部分。当我尝试运行 python ./odoo.py 时,我会遇到缺少模块的错误。所以我使用 pip install(psycopg2、reportlab、dateultil、passlib、psutil、requests)手动安装了一些,最后我让 odoo 服务器运行起来。但是当我尝试 localhost:8069 时,我一直收到内部服务器错误。


我在下面遇到了这个问题,我认为 postgresql 数据库的错误配置导致了我的 odoo 在没有 html 和 css 格式的情况下加载的问题。然后突然间它起作用了,我创建了一个数据库名和密码,但现在我看到了这个屏幕:

Broken Formatting and LESSC error

这是 LESSC 错误的最新堆栈跟踪:

(odoo-env) Marcios-MacBook-Air:~ quique123$ cd odoo
(odoo-env) Marcios-MacBook-Air:odoo quique123$ python ./odoo.py
2016-04-02 16:28:03,335 544 INFO ? openerp: OpenERP version 9.0c
2016-04-02 16:28:03,335 544 INFO ? openerp: addons paths: ['/Users/quique123/Library/Application Support/Odoo/addons/9.0', u'/Users/quique123/odoo/openerp/addons', u'/Users/quique123/odoo/addons']
2016-04-02 16:28:03,336 544 INFO ? openerp: database: default@default:default
2016-04-02 16:28:03,630 544 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
2016-04-02 16:30:06,356 544 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
2016-04-02 16:30:07,381 544 INFO ? openerp.addons.report.models.report: You need Wkhtmltopdf to print a pdf version of the reports.
2016-04-02 16:30:07,787 544 INFO ? openerp.http: HTTP Configuring static files
2016-04-02 16:30:07,938 544 INFO santiapps openerp.modules.loading: loading 1 modules...
2016-04-02 16:30:07,955 544 INFO santiapps openerp.modules.loading: 1 modules loaded in 0.02s, 0 queries
2016-04-02 16:30:08,025 544 INFO santiapps openerp.modules.loading: loading 28 modules...
2016-04-02 16:30:08,122 544 INFO santiapps openerp.modules.loading: 28 modules loaded in 0.10s, 0 queries
2016-04-02 16:30:08,578 544 INFO santiapps openerp.modules.loading: Modules loaded.
2016-04-02 16:30:08,580 544 INFO santiapps openerp.addons.base.ir.ir_http: Generating routing map
2016-04-02 16:30:09,466 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:09,827 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:10,000 544 INFO santiapps werkzeug: 127.0.0.1 - - [02/Apr/2016 16:30:09] "GET /web HTTP/1.1" 200 -
2016-04-02 16:30:12,110 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,155 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,185 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,226 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,239 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,419 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,630 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,647 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,651 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,711 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,729 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,742 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,829 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,836 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,837 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,921 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,923 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,951 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'

无需阅读以下内容,除非您认为它可能是数据库错误

首先我记得尝试使用此命令创建用户:

sudo su - postgres -c "createuser -s $USER"

我翻译成:

sudo su - postgres -c "createuser -s $quique123"

但还是Internal Server Error。我这样做是因为我发现这是由于数据库配置不正确造成的。当我继续研究 odoo 安装数据库配置问题时,我发现我需要修改 conf 文件以输入正确的用户凭据。所以我进入我的 odoo/debian/(在我的 virtualenv 中)并将 opernerp-server.conf 修改为:

admin_passwd = admin
db_host = localhost
db_port = 8069
db_user = $quique123
db_password = False

这很令人困惑,因为在我的 CD 中我有:

/奥杜 /odoo-环境

在/odoo 里面我有:

/ Derby 安 /openerp /openerp 服务器 和其他文件夹

然后/debian里面就是我修改过的openerp-server.conf。

现在,当我打开 localhost:8069 时,我确实得到了创建数据库或还原或备份的页面,但没有 html/css 格式,只有白色背景和黑色未格式化的字母,左上角的损坏图像图标以及所有文本字段和下拉菜单。 但是如果我查看终端然后我得到这个:

    **(odoo-env) Marcios-MacBook-Air:odoo quique123$ python ./odoo.py
2016-04-02 12:22:17,541 574 INFO ? openerp: OpenERP version 9.0c
2016-04-02 12:22:17,541 574 INFO ? openerp: addons paths: ['/Users/quique123/Library/Application Support/Odoo/addons/9.0', u'/Users/quique123/odoo/openerp/addons', u'/Users/quique123/odoo/addons']
2016-04-02 12:22:17,542 574 INFO ? openerp: database: default@default:default
2016-04-02 12:22:17,804 574 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069**
2016-04-02 12:23:22,910 574 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
2016-04-02 12:23:22,997 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:22] "GET / HTTP/1.1" 500 -
2016-04-02 12:23:23,007 574 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/Users/quique123/odoo-env/lib/python2.7/site-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/Users/quique123/odoo-env/lib/python2.7/site-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/Users/quique123/odoo/openerp/service/server.py", line 245, in app
    return self.app(e, s)
  File "/Users/quique123/odoo/openerp/service/wsgi_server.py", line 184, in application
    return application_unproxied(environ, start_response)
  File "/Users/quique123/odoo/openerp/service/wsgi_server.py", line 170, in application_unproxied
    result = handler(environ, start_response)
  File "/Users/quique123/odoo/openerp/http.py", line 1487, in __call__
    self.load_addons()
  File "/Users/quique123/odoo/openerp/http.py", line 1508, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/Users/quique123/odoo/openerp/modules/module.py", line 61, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/Users/quique123/odoo/addons/document/__init__.py", line 4, in <module>
    import models
  File "/Users/quique123/odoo/addons/document/models/__init__.py", line 4, in <module>
    import ir_attachment
  File "/Users/quique123/odoo/addons/document/models/ir_attachment.py", line 8, in <module>
    import pyPdf
ImportError: No module named pyPdf
2016-04-02 12:23:23,212 574 INFO ? openerp.http: Generating nondb routing
2016-04-02 12:23:23,228 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:23] "GET /favicon.ico HTTP/1.1" 404 -
2016-04-02 12:23:26,490 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET / HTTP/1.1" 200 -
2016-04-02 12:23:26,538 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web HTTP/1.1" 303 -
2016-04-02 12:23:26,586 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/database/selector HTTP/1.1" 200 -
2016-04-02 12:23:26,641 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 404 -
2016-04-02 12:23:26,643 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 404 -
2016-04-02 12:23:26,646 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 404 -
2016-04-02 12:23:26,648 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 404 -
2016-04-02 12:23:26,649 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 404 -
2016-04-02 12:23:26,651 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 404 -
2016-04-02 12:23:26,663 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/src/img/logo2.png HTTP/1.1" 404 -
2016-04-02 12:23:26,966 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/src/img/favicon.ico HTTP/1.1" 404 -
2016-04-02 12:24:18,834 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/database/selector HTTP/1.1" 200 -
2016-04-02 12:24:18,889 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 404 -
2016-04-02 12:24:18,891 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 404 -
2016-04-02 12:24:18,894 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 404 -
2016-04-02 12:24:18,894 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 404 -
2016-04-02 12:24:18,899 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 404 -
2016-04-02 12:24:18,899 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 404 -
2016-04-02 12:24:18,911 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/src/img/logo2.png HTTP/1.1" 404 -
2016-04-02 12:39:31,759 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/database/selector HTTP/1.1" 200 -
2016-04-02 12:39:31,815 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 404 -
2016-04-02 12:39:31,818 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 404 -
2016-04-02 12:39:31,821 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 404 -
2016-04-02 12:39:31,826 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 404 -
2016-04-02 12:39:31,826 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 404 -
2016-04-02 12:39:31,829 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 404 -
2016-04-02 12:39:31,838 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/src/img/logo2.png HTTP/1.1" 404 -

最佳答案

查看您发布的错误消息的堆栈跟踪,您缺少 pyPdf 包(与数据库无关)。

这可能会产生一些加载问题。

运行

pip install pyPdf

然后检查问题是否仍然存在。 如果是这样,请发布堆栈跟踪。

关于python - Mac 上安装 Odoo 无法执行命令 LESSC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36374069/

相关文章:

python - 按顺序打印字符串

python - 多维数组的多维 boolean 索引

python - Python 中的 TDD - 我们应该测试辅助函数吗?

objective-c - 旧版 Mac 系统上的 Twitter API 1.1

macos - 是否可以在生产中获取并运行 JDK 7?

arrays - plpgsql 函数在数组中搜索和移动索引

python - 使用 Matplotlib 在 3d 中绘制线性模型

sql - CREATE FUNCTION 后面的代码是一个字符串意味着什么?

postgresql - 总和 HH :mm in PostgreSQL

ios - Swift:将协议(protocol)的实现类型存储在协议(protocol)扩展的静态变量中