1

我正在开发我正在使用 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的权限

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

4

2 回答 2

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 命令旨在将 openerp 文件夹的所有权更改为/usr/lib/pymodules/python2.7user openerp。那是您的 openerp-server 进程应该在其下运行的用户。

我已经在 openerp 上工作了大约 2 天。我还不是专家。

于 2013-09-20T10:24:45.443 回答
0

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

于 2013-08-02T03:26:36.300 回答