sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #34853
Re: [Question #271968]: Windows: How to avoid: “ZipFile instance has no attribute '__exit__''” with module zipfile? --- use version 1.1.0 (includes Jython 2.7)
Question #271968 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/271968
Status: Answered => Solved
RaiMan changed the question status:
@George @comment #2
Your hack in the Jython module zipfile might have helped in your
situation with the jar file: I could reproduce the problem on Windows 10
with the SikuliX jars and your solution worked in these cases.
But after unpacking such a critical jar with 7Zip and re-zipping it with 7Zip, the problem was gone and the unmodified zipfile module did the job.
But now with your modification, it did not work anymore with this re-zipped jar.
Conclusion:
- whether or not you get the decode problem with Jython 2.7 depends on the way, the jar was created.
- in cases, where you get the problem, you might either try your hack or use a utility run from inside the script
... or use the new feature
unzip(sourceFile, targetFolder)
available with tomorrows build.
A zip(sourceFolder, targetFile) will follow the next days.
(it is implemented using the Java builtin support for zip-files)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.