Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing the import error UserError #130

Open
yongsern opened this issue Jan 22, 2018 · 1 comment
Open

Facing the import error UserError #130

yongsern opened this issue Jan 22, 2018 · 1 comment

Comments

@yongsern
Copy link

Commit ID: f5003ef

2018-01-22 04:53:17,163 16192 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 181, in execute
application_iter = app(environ, start_response)
File "/home/yslau/odoo-8.0/openerp/service/server.py", line 291, in app
return self.app(e, s)
File "/home/yslau/odoo-8.0/openerp/service/wsgi_server.py", line 216, in application
return application_unproxied(environ, start_response)
File "/home/yslau/odoo-8.0/openerp/service/wsgi_server.py", line 202, in application_unproxied
result = handler(environ, start_response)
File "/home/yslau/odoo-8.0/openerp/http.py", line 1295, in call
self.load_addons()
File "/home/yslau/odoo-8.0/openerp/http.py", line 1316, in load_addons
m = import('openerp.addons.' + module)
File "/home/yslau/odoo-8.0/openerp/modules/module.py", line 80, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/home/yslau/odoo-8.0/odoo-extra/website_twitter_wall/init.py", line 22, in
import controllers
File "/home/yslau/odoo-8.0/odoo-extra/website_twitter_wall/controllers/init.py", line 2, in
import main
File "/home/yslau/odoo-8.0/odoo-extra/website_twitter_wall/controllers/main.py", line 7, in
from openerp.addons.website_twitter_wall.models.oauth import Oauth
File "/home/yslau/odoo-8.0/odoo-extra/website_twitter_wall/models/init.py", line 3, in
import twitter_agent
File "/home/yslau/odoo-8.0/odoo-extra/website_twitter_wall/models/twitter_agent.py", line 4, in
from openerp.exceptions import UserError
ImportError: cannot import name UserError

@elhamdaoui
Copy link

Hello,
try to use

 from openerp.osv import fields, osv
  ....
 osv.except_osv(_('Error!')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants