Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse

Odoo 中文社区

  1. Home
  2. Categories
  3. Odoo 安装指南
  4. 求助:GreenOdoo-8.0-win32+Eclipse+PyDev调试源码,DebugAs出错

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

Scheduled Pinned Locked Moved Odoo 安装指南
6 Posts 3 Posters 9.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Freedom
    wrote on last edited by
    #1

    如标题所示,在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: &#91;&#039;data\\addons\\8.0&#039;, u&#039;E:\\GreenOdoo-8.0-win32\\source\\addons&#039;, &#039;E:\\GreenOdoo-8.0-win32\\source\\openerp\\addons&#039;]<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 />&nbsp; File &quot;E:\GreenOdoo-8.0-win32\runtime\python\lib\gevent\greenlet.py&quot;, line 327, in run<br />&nbsp; &nbsp; result = self._run(*self.args, **self.kwargs)<br />&nbsp; File &quot;E:\GreenOdoo-8.0-win32\source\openerp\service\server.py&quot;, line 386, in watch_parent<br />&nbsp; &nbsp; ppid = os.getppid()<br />AttributeError: &#039;module&#039; object has no attribute &#039;getppid&#039;<br />&lt;Greenlet at 0x4ed7e40: &lt;bound method GeventServer.watch_parent of &lt;openerp.service.server.GeventServer object at 0x037EDA90&gt;&gt;&gt; failed with AttributeError<br />
    



    请各位大侠帮帮忙啊,纠结好久啦...

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrshelly
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Freedom
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • 9 Offline
          9 Offline
          923485750
          wrote on last edited by
          #4

          这个问题需要编写一段代码,定义一下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).

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Freedom
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Tags
            • Popular
            • Users
            • Groups