求助:GreenOdoo-8.0-win32+Eclipse+PyDev调试源码,DebugAs出错
-
如标题所示,在Win7下搭建GreenOdoo-8.0-win32+Eclipse+PyDev环境,调试源码。
首先运行start-pg.bat启动数据库服务器,然后在Eclipse中右键单击odoo.py,选择RunAs Python Run,服务器能启动.
但当右键单击odoo.py,选择DebugAs Python Run的时候就会出错,输出如下:<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 />
请各位大侠帮帮忙啊,纠结好久啦... -
这个问题需要编写一段代码,定义一下getppid, 转载:http://blog.csdn.net/zhangfeng1133/article/details/46627969
之后可能出现openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072的问题,解决方法,
openerp/init.py 里面找到下面这几行,按照以下代码修改应该就可以了。
""" OpenERP core library."""
#----------------------------------------------------------
# Running mode flags (gevent, prefork)
#----------------------------------------------------------
# Is the server running with gevent.
import sys
evented = False
#if sys.modules.get("gevent") is not None:
# evented = True
# Is the server running in pefork mode (e.g. behind Gunicorn).