Windows: How to avoid: “ZipFile instance has no attribute '__exit__''” with module zipfile? --- use version 1.1.0 (includes Jython 2.7)
***************** workaround/
after 2015-10-02 this new feature is available:
unzip(sourceFile, targetFolder)
unzips the content to targetFolder while preserving a zipped folder structure
(implemented using the Java builtin support for zip-files)
... also unzips jar files
-------
[1]
The structure is: .bat file triggers a .py file
The bat file reads: start /i /b /wait C:\Sikuli\
The code inside .py is :
import zipfile
with zipfile.
z.extractal
This code produces:
AttributeError ( ZipFile instance has no attribute '__exit__' )
[2]
note: The code from "test.py" works when run from python idle. I am running python v2.7.10
note: Other methods (that i tried) from zip module do not return any issues.
[3]
Full stack trace:
Exception in thread "main" java.lang.
at java.util.
at org.sikuli.
va:326)
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
@ edit :
hmm. I believed I found the cause. when running "import sys print sys.version" using the structure mentioned above I get: 2.5.4rc1 (2.5:723492dbab02, Feb 8 2013, 10:13:55) . In python default idle I get: 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)]
Therefore, please tell me, how can I get sikuli to recognize 2.7.10 ?
Take care
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: