Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
572 views
in Technique[技术] by (71.8m points)

python - Odoo Installation on Mac Could Not Execute Command LESSC

So I have a mac running 10.11.4 (El Capitan).

I followed this tutorial: http://kiattipong.blogspot.com/2015/05/setup-odoo-development-on-os-x-with.html?showComment=1459570104589. Actually the issues I had I posted in the comments section in this blog as well.

Everything went smoothly up to about the requirements part where I got some installation errors (file not found). When I tried to run python ./odoo.py I would get missing module errors. So I manually installed some using pip install ( psycopg2, reportlab, dateultil, passlib, psutil, requests) and finally I got the odoo server running. But when I tried localhost:8069 I kept getting internal server error.


I was having this issue below where I thought the misconfiguration of the postgresql db was causing the problem where my odoo loaded without html and css formatting. Then all of a sudden it worked, i created a dbname and password but now I get this screen:

Broken Formatting and LESSC error

Here is the latest stack trace for the LESSC error:

(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'

NO NEED TO READ BELOW UNLESS YOU THINK IT MIGHT BE A DB ERROR

First I remember trying to create a user using this command:

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

which I translated to:

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

But still Internal Server Error. I did this because I found that that was caused by a db not being configured properly. As I kept researching about odoo installation db config issues I found I then needed to modify the conf file to enter the right user credentials. So I went into my odoo/debian/ (within my virtualenv) and modified the opernerp-server.conf to this:

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

Its confusing because in my cd I have:

/odoo /odoo-env

And inside /odoo I have:

/debian /openerp /openerp-server and other folders

Then inside /debian is the openerp-server.conf I've modified.

Now when I open localhost:8069 I do get the page to create the db or retore or backup, but no html/css formatting, just white background and black unformatted letters, broken image icon on top left and all the textfields and dropdowns. But if I look in the terminal then I get this:

    **(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 ? werk

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Looking at the stack trace of the error message you posted, you are missing the pyPdf package (unrelated to the database).

This could be generating some loading issues.

Run

pip install pyPdf

and check if the problem still persists. If so, post the stack trace.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...