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

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

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

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

求助:GreenOdoo-8.0-win32+Eclipse+PyDev调试源码,DebugAs出错



  • 如标题所示,在Win7下搭建GreenOdoo-8.0-win32+Eclipse+PyDev环境,调试源码。<br />首先运行start-pg.bat启动数据库服务器,然后在Eclipse中右键单击odoo.py,选择RunAs Python Run,服务器能启动.<br />但当右键单击odoo.py,选择DebugAs Python Run的时候就会出错,输出如下:<br />[code]<br />pydev debugger: starting (pid: 2224)<br />2015-10-25 18:25:55,910 2224 INFO ? openerp: OpenERP version 8.0<br />2015-10-25 18:25:55,910 2224 INFO ? openerp: addons paths: ['data\addons\8.0', u'E:\GreenOdoo-8.0-win32\source\addons', 'E:\GreenOdoo-8.0-win32\source\openerp\addons']<br />2015-10-25 18:25:55,911 2224 INFO ? openerp: database hostname: 127.0.0.1<br />2015-10-25 18:25:55,911 2224 INFO ? openerp: database port: 65432<br />2015-10-25 18:25:55,911 2224 INFO ? openerp: database user: openerp<br />2015-10-25 18:25:56,490 2224 INFO ? openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072<br />Traceback (most recent call last):<br />  File "E:\GreenOdoo-8.0-win32\runtime\python\lib\gevent\greenlet.py", line 327, in run<br />    result = self._run(*self.args, **self.kwargs)<br />  File "E:\GreenOdoo-8.0-win32\source\openerp\service\server.py", line 386, in watch_parent<br />    ppid = os.getppid()<br />AttributeError: 'module' object has no attribute 'getppid'<br /><Greenlet at 0x4ed7e40: <bound method GeventServer.watch_parent of <openerp.service.server.GeventServer object at 0x037EDA90>>> failed with AttributeError<br />[/code]<br /><br />请各位大侠帮帮忙啊,纠结好久啦...



  • 如标题所示,在Win7下搭建GreenOdoo-8.0-win32+Eclipse+PyDev环境,调试源码。<br />首先运行start-pg.bat启动数据库服务器,然后在Eclipse中右键单击odoo.py,选择RunAs Python Run,服务器能启动.<br />但当右键单击odoo.py,选择DebugAs Python Run的时候就会出错,输出如下:<br />[code]<br />pydev debugger: starting (pid: 2224)<br />2015-10-25 18:25:55,910 2224 INFO ? openerp: OpenERP version 8.0<br />2015-10-25 18:25:55,910 2224 INFO ? openerp: addons paths: ['data\addons\8.0', u'E:\GreenOdoo-8.0-win32\source\addons', 'E:\GreenOdoo-8.0-win32\source\openerp\addons']<br />2015-10-25 18:25:55,911 2224 INFO ? openerp: database hostname: 127.0.0.1<br />2015-10-25 18:25:55,911 2224 INFO ? openerp: database port: 65432<br />2015-10-25 18:25:55,911 2224 INFO ? openerp: database user: openerp<br />2015-10-25 18:25:56,490 2224 INFO ? openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072<br />Traceback (most recent call last):<br />  File "E:\GreenOdoo-8.0-win32\runtime\python\lib\gevent\greenlet.py", line 327, in run<br />    result = self._run(*self.args, **self.kwargs)<br />  File "E:\GreenOdoo-8.0-win32\source\openerp\service\server.py", line 386, in watch_parent<br />    ppid = os.getppid()<br />AttributeError: 'module' object has no attribute 'getppid'<br /><Greenlet at 0x4ed7e40: <bound method GeventServer.watch_parent of <openerp.service.server.GeventServer object at 0x037EDA90>>> failed with AttributeError<br />[/code]<br /><br />请各位大侠帮帮忙啊,纠结好久啦...



  • 把配置文件的 workers 行 注释掉?



  • 感谢您的帮助,很抱歉这么久才回复您。<br />注释掉 works 问题还是存在。<br />我是odoo的初学者,感觉自己还是应该先打打基础,不能急着源码调试什么的。<br />再次感谢您的帮助。<br />



  • 这个问题需要编写一段代码,定义一下getppid,  转载:http://blog.csdn.net/zhangfeng1133/article/details/46627969<br />之后可能出现openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072的问题,解决方法, <br />openerp/init.py 里面找到下面这几行,按照以下代码修改应该就可以了。<br />""" OpenERP core library."""<br /><br />#----------------------------------------------------------<br /># Running mode flags (gevent, prefork)<br />#----------------------------------------------------------<br /># Is the server running with gevent.<br /><br /><br />import sys<br />evented = False<br /><br /><br />#if sys.modules.get("gevent") is not None:<br />#    evented = True<br /><br /># Is the server running in pefork mode (e.g. behind Gunicorn).



  • 非常非常感谢,注释的方法是可以的,能解决问题。<br />但是链接里提到的在server.py里添加代码的方法,试了下有问题,还在尝试。


登录后回复
 

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