Re: [Zope] external method with import tarfile

2006-07-19 Thread Alan
Hi there! I managed to find the problem and the solution. First, I've forgot to mention that in my script, oname is an uploaded file. I just inserted a f.close() and voilá! def upload_external(self,file,REQUEST): import os,tarfile ... f=open(oname,wb) f.write(file.read()) f.close() ...

Re: [Zope] external method with import tarfile

2006-07-19 Thread Tino Wildenhain
Alan wrote: Hi there! I managed to find the problem and the solution. First, I've forgot to mention that in my script, oname is an uploaded file. I just inserted a f.close() and voilá! def upload_external(self,file,REQUEST): import os,tarfile ... f=open(oname,wb)

[Zope] external method with import tarfile

2006-07-18 Thread Alan
Hi! I am trying to run a external python script. Now I am facing a problem that occurs only when I run the script via Zope. ... import os,tarfile ... tar = tarfile.open(oname,r:gz) for itar in tar: tar.extract(itar.name,jobdir) gives me: Site Error An error was encountered while

Re: [Zope] external method with import tarfile

2006-07-18 Thread Andreas Jung
--On 18. Juli 2006 16:12:18 +0100 Alan [EMAIL PROTECTED] wrote: Error Type: IOError Error Value: CRC check failed This is unlikely a Zope issue. Either your tar file is broken or the tarfile module is broken. Check if your code runs without Zope as a simple PythonScript..there is nothing