将Tally数据导入Openerp

时间:2013-08-01 13:23:09

标签: python-2.7 openerp

我正在使用模块,我正在使用openerp的tally_integrator模块。成功安装后,当我尝试导入计数数据时,我收到以下错误

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1052, in call_button
    action = self.call_common(req, model, method, args, domain_id, context_id)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 996, in call_common
    return self._call_kw(req, model, method, args, {})
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1010, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
    args, kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 608, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/common/http.py", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 186, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 129, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 195, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 183, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/tally_integrator/wizard/tally_connection.py", line 142, in tally_main
    _processData(s)
  File "/usr/lib/pymodules/python2.7/openerp/addons/tally_integrator/wizard/tally_connection.py", line 124, in _processData
    f = self.createTempFile(s)
  File "/usr/lib/pymodules/python2.7/openerp/addons/tally_integrator/wizard/tally_connection.py", line 106, in createTempFile
    f = open('temp.xml','w')
IOError: [Errno 13] Permission denied: 'temp.xml'

请让我知道我更改了以下目录的权限是什么错误 /usr/lib/pymodules/python2.7/openerp

但我仍然收到此错误。请帮我解决这个问题。

2 个答案:

答案 0 :(得分:2)

假设您已经完成了本书的openerp安装,对于任何类型的权限被拒绝错误的形式为:

OSError: [Errno 13] Permission denied: '/usr/lib/pymodules/python2.7/openerp/addons/etl'

根据我的一般解决方案是:

cd /usr/lib/pymodules/python2.7
chown -R openerp: openerp

chown命令旨在将/usr/lib/pymodules/python2.7下的openerp文件夹的所有权更改为用户openerp。那是你的openerp-server进程应该运行的用户。

我现在在开幕式上工作了大约2天。我还不是专家。

答案 1 :(得分:0)

冒着说明问题的风险,您没有该位置的写入权限。由于没有路径,我认为它将在您当前的工作目录中打开。执行ps -ef获取PID然后运行ls -ld /proc/PID/cwd - 这将显示进程的当前工作目录,然后检查目录上的写入位和用户/组。