odoo-10.0 create database 失败
Posted 元亨利贞
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了odoo-10.0 create database 失败相关的知识,希望对你有一定的参考价值。
在初始化数据库的界面点击【create database】
create database 失败
报错如下
2017-01-05 20:15:18,529 4652 INFO ? werkzeug: 127.0.0.1 - - [05/Jan/2017 20:15:18] "GET / HTTP/1.1" 303 -
2017-01-05 20:15:18,835 4652 INFO ? werkzeug: 127.0.0.1 - - [05/Jan/2017 20:15:18] "GET /web HTTP/1.1" 303 -
2017-01-05 20:15:19,243 4652 INFO ? werkzeug: 127.0.0.1 - - [05/Jan/2017 20:15:19] "GET /web/database/selector HTTP/1.1" 200 -
2017-01-05 20:17:34,154 4652 INFO None odoo.service.db: Create database `hello`.
2017-01-05 20:17:34,252 4652 INFO None odoo.sql_db: bad query: CREATE DATABASE "hello" ENCODING ‘unicode‘ TEMPLATE "template1"
2017-01-05 20:17:34,252 4652 ERROR None odoo.http: 错误: 创建数据库权限不够
Traceback (most recent call last):
File "C:\odoo-10.0\odoo\http.py", line 118, in dispatch_rpc
result = dispatch(method, params)
File "C:\odoo-10.0\odoo\service\db.py", line 381, in dispatch
return g[exp_method_name](*params)
File "C:\odoo-10.0\odoo\service\db.py", line 92, in exp_create_database
_create_empty_database(db_name)
File "C:\odoo-10.0\odoo\service\db.py", line 87, in _create_empty_database
cr.execute("""CREATE DATABASE "%s" ENCODING ‘unicode‘ TEMPLATE "%s" """ % (name, chosen_template))
File "C:\odoo-10.0\odoo\sql_db.py", line 141, in wrapper
return f(self, *args, **kwargs)
File "C:\odoo-10.0\odoo\sql_db.py", line 218, in execute
res = self._obj.execute(query, params)
ProgrammingError: 閿欒: 鍒涘缓鏁版嵁搴撴潈闄愪笉澶?
2017-01-05 20:17:34,407 4652 INFO None werkzeug: 127.0.0.1 - - [05/Jan/2017 20:17:34] "POST /web/database/create HTTP/1.1" 500 -
2017-01-05 20:17:34,440 4652 ERROR None werkzeug: Error on request:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\werkzeug\serving.py", line 193, in run_wsgi
execute(self.server.app)
File "C:\Python27\lib\site-packages\werkzeug\serving.py", line 181, in execute
application_iter = app(environ, start_response)
File "C:\odoo-10.0\odoo\service\server.py", line 246, in app
return self.app(e, s)
File "C:\odoo-10.0\odoo\service\wsgi_server.py", line 184, in application
return application_unproxied(environ, start_response)
File "C:\odoo-10.0\odoo\service\wsgi_server.py", line 170, in application_unproxied
result = handler(environ, start_response)
File "C:\odoo-10.0\odoo\http.py", line 1306, in __call__
return self.dispatch(environ, start_response)
File "C:\odoo-10.0\odoo\http.py", line 1280, in __call__
return self.app(environ, start_wrapped)
File "C:\Python27\lib\site-packages\werkzeug\wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "C:\odoo-10.0\odoo\http.py", line 1474, in dispatch
result = _dispatch_nodb()
File "C:\odoo-10.0\odoo\http.py", line 1447, in _dispatch_nodb
result = request.dispatch()
File "C:\odoo-10.0\odoo\http.py", line 825, in dispatch
r = self._call_function(**self.params)
File "C:\odoo-10.0\odoo\http.py", line 332, in _call_function
return self.endpoint(*args, **kwargs)
File "C:\odoo-10.0\odoo\http.py", line 933, in __call__
return self.method(*args, **kw)
File "C:\odoo-10.0\odoo\http.py", line 504, in response_wrap
response = f(*args, **kw)
File "c:\odoo-10.0\addons\web\controllers\main.py", line 640, in create
return self._render_template(error=error)
File "c:\odoo-10.0\addons\web\controllers\main.py", line 620, in _render_template
return env.get_template("database_manager.html").render(d)
File "C:\Python27\lib\site-packages\jinja2\environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "C:\Python27\lib\site-packages\jinja2\environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "c:\odoo-10.0\addons\web\views\database_manager.html", line 128, in top-level template code
<div class="alert alert-danger">{{ error }}</div>
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xe9 in position 25: ordinal not in range(128)
2017-01-05 20:17:34,796 4652 INFO ? werkzeug: 127.0.0.1 - - [05/Jan/2017 20:17:34] "GET /favicon.ico HTTP/1.1" 404 -
2017-01-05 20:17:34,923 4652 INFO ? werkzeug: 127.0.0.1 - - [05/Jan/2017 20:17:34] "GET /favicon.ico HTTP/1.1" 404 -
显然,创建数据库的权限不够,到数据库中查看并赋予用户权限即可
赋予用户权限binggo! 成功进击下一步,another 坑:无法执行命令 lessc
以上是关于odoo-10.0 create database 失败的主要内容,如果未能解决你的问题,请参考以下文章