Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

源码运行初始化数据库时发生错误!



  • 哪位帮忙看下:<br />运行下列命令后出的问题:<br />python ./bin/openerp-server.py -r openerp -w openerp --db_host 127.0.0.1 --init all<br />

    [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 />&nbsp; File &quot;./bin/openerp-server.py&quot;, line 121, in &lt;module&gt;<br />&nbsp; &nbsp; db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config&#91;&#039;init&#039;] or tools.config&#91;&#039;update&#039;], pooljobs=False)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/pooler.py&quot;, line 39, in get_db_and_pool<br />&nbsp; &nbsp; addons.load_modules(db, force_demo, status, update_module)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 833, in load_modules<br />&nbsp; &nbsp; processed_modules.extend(load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report))<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 748, in load_module_graph<br />&nbsp; &nbsp; load_init_update_xml(cr, m, idref, mode, kind)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 641, in load_init_update_xml<br />&nbsp; &nbsp; tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/tools/convert.py&quot;, line 963, in convert_xml_import<br />&nbsp; &nbsp; etree.parse(os.path.join(config&#91;&#039;root_path&#039;],&#039;import_xml.rng&#039; )))<br />&nbsp; File &quot;lxml.etree.pyx&quot;, line 2942, in lxml.etree.parse (src/lxml/lxml.etree.c:54187)<br />&nbsp; File &quot;parser.pxi&quot;, line 1528, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:79485)<br />&nbsp; File &quot;parser.pxi&quot;, line 1557, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:79768)<br />&nbsp; File &quot;parser.pxi&quot;, line 1457, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:78843)<br />&nbsp; File &quot;parser.pxi&quot;, line 997, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:75698)<br />&nbsp; File &quot;parser.pxi&quot;, line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)<br />&nbsp; File &quot;parser.pxi&quot;, line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)<br />&nbsp; File &quot;parser.pxi&quot;, line 583, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71927)<br />IOError: Error reading file &#039;/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng&#039;: failed to load external entity &quot;/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng&quot;
    

  • 管理员

    [quote author=pen2g link=topic=2467.msg8178#msg8178 date=1308316931]<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"<br />[/quote]<br />应该是权限问题,运行openerp的用户对‘import_xml.rng文件没有读权限<br />【Edit】还是楼下Shelly看的仔细,应该是路径问题



  • 建议在 bin 文件夹下面 用 python 运行 openerp-server.py 脚本. <br /><br />如果在 bin 的上一级, 是不是指定 root_path 参数会比较好呢?<br /><br />应该是路径没对造成了 import_xml.rng 文件没有找到...



  • 是root_path的问题,将openerp_serverrc的<br />root_path=/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng<br />改成源代码的bin目录就可以了!<br />感谢二位的回贴!<br />