Các mã sau đây:Cần có các quyền nào đối với tiến trình con.Popen?
gb = self.request.form['groupby']
typ = self.request.form['type']
tbl = self.request.form['table']
primary = self.request.form.get('primary', None)
if primary is not None:
create = False
else:
create = True
mdb = tempfile.NamedTemporaryFile()
mdb.write(self.request.form['mdb'].read())
mdb.seek(0)
csv = tempfile.TemporaryFile()
conversion = subprocess.Popen(("/Users/jondoe/development/mdb-export", mdb.name, tbl,),stdout=csv)
Nguyên nhân của lỗi này khi gọi dòng cuối cùng ví dụ: 'chuyển đổi =' trong OS X.
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module circulartriangle.mdbtoat.mdb, line 62, in __call__
Module subprocess, line 543, in __init__
Module subprocess, line 975, in _execute_child
OSError: [Errno 13] Permission denied
Tôi đã thử chmod 777 /Users/jondoe/development/mdb-export
- những gì khác có thể được yêu cầu?
tôi đã thực hiện một thư mục/mdb xuất trong root (didn' t thiết lập lạ mắt chmod 777 trên/Người dùng) và chmod'ed nó đến 777. Lỗi tương tự vẫn còn. –