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

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

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

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

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



  • 哪位帮忙看下:
    运行下列命令后出的问题:
    python ./bin/openerp-server.py -r openerp -w openerp --db_host 127.0.0.1 --init all
    [code][2011-06-17 21:18:05,005][openerp] INFO:init:module base: loading objects
    [2011-06-17 21:18:05,006][openerp] INFO:init:module base: registering objects
    [2011-06-17 21:18:05,365][openerp] INFO:init:module base: creating or updating database tables
    [2011-06-17 21:18:09,587][openerp] INFO:init:module base: loading base_data.xml
    Traceback (most recent call last):
      File "./bin/openerp-server.py", line 121, in <module>
        db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config['init'] or tools.config['update'], pooljobs=False)
      File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 39, in get_db_and_pool
        addons.load_modules(db, force_demo, status, update_module)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 833, in load_modules
        processed_modules.extend(load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report))
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 748, in load_module_graph
        load_init_update_xml(cr, m, idref, mode, kind)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 641, in load_init_update_xml
        tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)
      File "/home/pengyong/workspace/openerp-server602/bin/tools/convert.py", line 963, in convert_xml_import
        etree.parse(os.path.join(config['root_path'],'import_xml.rng' )))
      File "lxml.etree.pyx", line 2942, in lxml.etree.parse (src/lxml/lxml.etree.c:54187)
      File "parser.pxi", line 1528, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:79485)
      File "parser.pxi", line 1557, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:79768)
      File "parser.pxi", line 1457, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:78843)
      File "parser.pxi", line 997, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:75698)
      File "parser.pxi", line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)
      File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)
      File "parser.pxi", line 583, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71927)
    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"[/code]



  • 哪位帮忙看下:
    运行下列命令后出的问题:
    python ./bin/openerp-server.py -r openerp -w openerp --db_host 127.0.0.1 --init all
    [code][2011-06-17 21:18:05,005][openerp] INFO:init:module base: loading objects
    [2011-06-17 21:18:05,006][openerp] INFO:init:module base: registering objects
    [2011-06-17 21:18:05,365][openerp] INFO:init:module base: creating or updating database tables
    [2011-06-17 21:18:09,587][openerp] INFO:init:module base: loading base_data.xml
    Traceback (most recent call last):
      File "./bin/openerp-server.py", line 121, in <module>
        db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config['init'] or tools.config['update'], pooljobs=False)
      File "/home/pengyong/workspace/openerp-server602/bin/pooler.py", line 39, in get_db_and_pool
        addons.load_modules(db, force_demo, status, update_module)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 833, in load_modules
        processed_modules.extend(load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report))
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 748, in load_module_graph
        load_init_update_xml(cr, m, idref, mode, kind)
      File "/home/pengyong/workspace/openerp-server602/bin/addons/init.py", line 641, in load_init_update_xml
        tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)
      File "/home/pengyong/workspace/openerp-server602/bin/tools/convert.py", line 963, in convert_xml_import
        etree.parse(os.path.join(config['root_path'],'import_xml.rng' )))
      File "lxml.etree.pyx", line 2942, in lxml.etree.parse (src/lxml/lxml.etree.c:54187)
      File "parser.pxi", line 1528, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:79485)
      File "parser.pxi", line 1557, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:79768)
      File "parser.pxi", line 1457, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:78843)
      File "parser.pxi", line 997, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:75698)
      File "parser.pxi", line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)
      File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)
      File "parser.pxi", line 583, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71927)
    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"[/code]


  • 管理员

    [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 文件没有找到...



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


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待