-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyxform 0.9.22 validation not completing #7
Comments
popen in Python has lots of dragons, so it's hard to write platform independent code. If java is in your PATH, the code as written should work. Here is the code I use for XLSForm Offline.
|
Problem, "which" is command in linux and "where" is command in windows. You must change function like this: |
What steps will reproduce the problem?
1.Install pyxform 0.9.22
2.Run converter
3.Conversion completes but validation does not
What is the expected output? What do you see instead?
Successful conversion and validation. Conversion to XML completes but validation does not.
What version of the product are you using? On what operating system?
pyxform 0.9.22 Windows 7 OS
Please provide any additional information below.
I could be wrong, I'm not a Unix expert; but it looks to me like this is an issue with a Unix specific command being included in pyxform which doesn't work on Windows. It is in pyxform/odk_validate/init.py, the _java_installed function, the "which" command submitted through Popen.
def _java_installed():
p = Popen(["which","java"], stdout=PIPE)
return len(p.stdout.readlines()) != 0
When I comment out the call for this function, converter and validation both work fine.
The text was updated successfully, but these errors were encountered: