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

由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

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

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

問題 ebay connector with OpenERP6.1




  • 請叫各位兩點
    1) 我想把ebay connector 模組加到openERP6.1
      但是都會出現以下錯誤  有人知道怎麼修正嗎? 還是有哪位大大把這module修正成6.1版本了嗎

    您的 OpenERP 版本没有包含支持。支持与维护服务在此处可以购买:模型”%s“的字段.

    OpenERP Server Error

    Client Traceback (most recent call last):
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\common\http.py", line 180, in dispatch
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\controllers\main.py", line 1004, in call_button
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\controllers\main.py", line 948, in call_common
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\controllers\main.py", line 962, in call_kw
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\common\openerplib\main.py", line 250, in proxy
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\common\openerplib\main.py", line 117, in proxy
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\common\http.py", line 611, in send


    Server Traceback (most recent call last):
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\web\common\http.py", line 592, in send
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\netsvc.py", line 360, in dispatch_rpc
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\service\web_services.py", line 572, in dispatch
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\osv\osv.py", line 167, in execute_kw
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\osv\osv.py", line 121, in wrapper
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\osv\osv.py", line 176, in execute
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\osv\osv.py", line 164, in execute_cr
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\base\module\module.py", line 359, in button_immediate_install
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\pooler.py", line 39, in restart_pool
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\modules\registry.py", line 160, in new
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\modules\loading.py", line 338, in load_modules
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\modules\loading.py", line 253, in load_marked_modules
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\modules\loading.py", line 165, in load_module_graph
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\modules\module.py", line 409, in load_openerp_module
      File "C:\Program Files\OpenERP 6.1-1\server.\openerp\modules\module.py", line 139, in load_module
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\ebay_connector_init
    .py", line 19, in <module>
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\ebay_connector\category.py", line 23, in <module>
      File "C:\Program Files\OpenERP 6.1-1\server\openerp\addons\ebay_connector\ebayerp_osv.py", line 3168, in <module>
    AttributeError: 'module' object has no attribute 'external_osv'


    2) 我要另外加 ecommerce module 也是套入失敗,
    看了許多 module似乎都有支援6.0板但不一定支援6.1,
    我是不是該脆用6.0板比較好....XD



  • 我是用6.0.3版本的,安装是成功的,但是配置后,点一个按钮就报错。

    报错问题是类似编码问题:
    附上报错代码:

    <br />Traceback (most recent call last):<br />&nbsp; File &quot;/opt/openerp/server/bin/netsvc.py&quot;, line 489, in dispatch<br />&nbsp; &nbsp; result = ExportService.getService(service_name).dispatch(method, auth, params)<br />&nbsp; File &quot;/opt/openerp/server/bin/service/web_services.py&quot;, line 599, in dispatch<br />&nbsp; &nbsp; res = fn(db, uid, *params)<br />&nbsp; File &quot;/opt/openerp/server/bin/osv/osv.py&quot;, line 122, in wrapper<br />&nbsp; &nbsp; return f(self, dbname, *args, **kwargs)<br />&nbsp; File &quot;/opt/openerp/server/bin/osv/osv.py&quot;, line 176, in execute<br />&nbsp; &nbsp; res = self.execute_cr(cr, uid, obj, method, *args, **kw)<br />&nbsp; File &quot;/opt/openerp/server/bin/osv/osv.py&quot;, line 167, in execute_cr<br />&nbsp; &nbsp; return getattr(object, method)(cr, uid, *args, **kw)<br />&nbsp; File &quot;/opt/openerp/server/bin/addons/eBay_Connector/template.py&quot;, line 750, in import_orders<br />&nbsp; &nbsp; results = self.call(cr, uid, inst_lnk, &#039;GetSellerTransactions&#039;,currentTimeFrom,currentTimeTo,pageNumber,siteid)<br />&nbsp; File &quot;/opt/openerp/server/bin/addons/eBay_Connector/ebayerp_osv.py&quot;, line 3204, in call<br />&nbsp; &nbsp; result = gSellerTrans.Get(arguments[0],arguments[1],arguments[2],arguments[3])<br />&nbsp; File &quot;/opt/openerp/server/bin/addons/eBay_Connector/ebayerp_osv.py&quot;, line 523, in Get<br />&nbsp; &nbsp; responseDOM = api.MakeCall(&quot;GetSellerTransactions&quot;)<br />&nbsp; File &quot;/opt/openerp/server/bin/addons/eBay_Connector/ebayerp_osv.py&quot;, line 57, in MakeCall<br />&nbsp; &nbsp; conn.request(&quot;POST&quot;, self.Session.Command, self.RequestData, self.GenerateHeaders(self.Session, CallName))<br />&nbsp; File &quot;/usr/lib/python2.7/httplib.py&quot;, line 955, in request<br />&nbsp; &nbsp; self._send_request(method, url, body, headers)<br />&nbsp; File &quot;/usr/lib/python2.7/httplib.py&quot;, line 989, in _send_request<br />&nbsp; &nbsp; self.endheaders(body)<br />&nbsp; File &quot;/usr/lib/python2.7/httplib.py&quot;, line 951, in endheaders<br />&nbsp; &nbsp; self._send_output(message_body)<br />&nbsp; File &quot;/usr/lib/python2.7/httplib.py&quot;, line 809, in _send_output<br />&nbsp; &nbsp; msg += message_body<br />UnicodeDecodeError: &#039;ascii&#039; codec can&#039;t decode byte 0xe2 in position 1377: ordinal not in range(128)<br />
    



    神奇的是我一步步调试下来,并没有什么ascii的编码格式。
    有没有人玩过这个组件的,一起来讨论下。


  • 管理员

    不太神奇的是,Python的默认的编码就是:ASCII
    当unicode decoding 时,如果未给字符串指定编码,就会用ASCII解码,而如果该字符串是用其他编码encode的,就会报decode错误。
    比如你的例子中:在unicode和string做连接(concatenate)时(python 2.x下),string需要转换为unicode
    msg = u'中文unicode'
    message_body = '中文string'
    msg += message_body

    就会出decode错误,因为python会用ASCII来解码'中文string', 这是无法完成的。



  • 不过我用的帐套中是没有任何中文的,难道默认也会发生这些问题?

    那如果我用
    sys.setdefaultencoding(‘utf-8’) 
    是不是就有用呢?


  • 管理员

    不一定是中文,比如latin1编码的字符串用ASCII解码也会出现解码错误。

    sys.setdefaultencoding('utf-8')并不真的能解决问题。而且sys.setdefaultencoding在site.py中已经被删除,我们不能直接使用。一定要使用,要么修改site.py, 要么在sitecustomize.py 文件中调用。这样虽然似乎能解决大多数的问题,但是在你的python环境中跑得正常的程序却不一定在别人的机器上正常运行。

    所以,建议还是搞清字串编码,显式的做字串的编,解码



  • 谢谢大大的回复,看来python的编码真的是长征第一步啊。


Log in to reply