源码运行初始化数据库时发生错误!
-
哪位帮忙看下:
运行下列命令后出的问题:
python ./bin/openerp-server.py -r openerp -w openerp --db_host 127.0.0.1 --init all[2011-06-17 21:18:05,005][openerp] INFO:init:module base: loading objects<br />[2011-06-17 21:18:05,006][openerp] INFO:init:module base: registering objects<br />[2011-06-17 21:18:05,365][openerp] INFO:init:module base: creating or updating database tables<br />[2011-06-17 21:18:09,587][openerp] INFO:init:module base: loading base_data.xml<br />Traceback (most recent call last):<br /> File "./bin/openerp-server.py", line 121, in <module><br /> db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config['init'] or tools.config['update'], pooljobs=False)<br /> File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 39, in get_db_and_pool<br /> addons.load_modules(db, force_demo, status, update_module)<br /> File "/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py", line 833, in load_modules<br /> processed_modules.extend(load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report))<br /> File "/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py", line 748, in load_module_graph<br /> load_init_update_xml(cr, m, idref, mode, kind)<br /> File "/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py", line 641, in load_init_update_xml<br /> tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)<br /> File "/home/pengyong/workspace/openerp-server602/bin/tools/convert.py", line 963, in convert_xml_import<br /> etree.parse(os.path.join(config['root_path'],'import_xml.rng' )))<br /> File "lxml.etree.pyx", line 2942, in lxml.etree.parse (src/lxml/lxml.etree.c:54187)<br /> File "parser.pxi", line 1528, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:79485)<br /> File "parser.pxi", line 1557, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:79768)<br /> File "parser.pxi", line 1457, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:78843)<br /> File "parser.pxi", line 997, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:75698)<br /> File "parser.pxi", line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)<br /> File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)<br /> File "parser.pxi", line 583, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71927)<br />IOError: Error reading file '/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng': failed to load external entity "/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng"
-
[quote author=pen2g link=topic=2467.msg8178#msg8178 date=1308316931]
IOError: Error reading file '/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng': failed to load external entity "/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng"
[/quote]
应该是权限问题,运行openerp的用户对‘import_xml.rng文件没有读权限
【Edit】还是楼下Shelly看的仔细,应该是路径问题 -
建议在 bin 文件夹下面 用 python 运行 openerp-server.py 脚本.
如果在 bin 的上一级, 是不是指定 root_path 参数会比较好呢?
应该是路径没对造成了 import_xml.rng 文件没有找到...