sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #34844
Re: [Question #271968]: How can I avoid: “ZipFile instance has no attribute '__exit__''” when extracting a zip file?
Question #271968 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/271968
Status: Open => Answered
RaiMan proposed the following answer:
SikuliX will never be able to "recognize" any Python interpreter (C-Python).
SikuliX Python scripting internally uses the Jython interpreter (Java based), to run the scripts.
Apparently you do not use version 1.1.0, which come with the Jython
version 2.7, which at least is more compatible in most aspects to Python
2.7.
Nevertheless:
AttributeError ( ZipFile instance has no attribute '__exit__' )
simply means, that you cannot use with here.
try:
z = zipfile.ZipFile('test.jar', 'r')
z.extractall(r"C:\testfolder")
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.