-
Notifications
You must be signed in to change notification settings - Fork 137
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
return_code: 3221226505 with ODK_Validate.jar #737
Comments
Here are a few troubleshooting ideas: It may be an issue with ODK Validate. It was last updated in pyxform v2.11 so try pyxform v2.10. If that doesn't work, let us know what pyxform version was in use before this problem started. Environment variables are needed by the Popen call you mentioned, to ensure that Java correctly locates the user (rather than system) temp directory for writing files. Confirm that the directory It could be a Java issue, so try prefixing the If none of the above addresses it, please provide a XLSForm (XLS or markdown) which can be used to reproduce the issue. |
I tried many version of ODK all the way back to 1.9 with the same results, I also checked the existence of temp files and all looks good. I had Java 8 installed when I first started having this issue, I then uninstalled it and installed Java 21 using winget. I ran
I followed your advice and change the command in \pyxform\validators\odk_validate_init_.py under the _call_validator function as follows:
I have to do some more research on why this is the case and why also removing the env from the call causes it to work as well but I think this issue can be closed unless or maybe some additional checks can be made to provide a better error message as in this particular case the output is as follow which is not helpful:
|
The TLDR is if you are having ODK Validate Errors: message without any errors showing up it could be because the Java environment variable is set to |
Software and hardware versions
pyxform v2.2.0, Python 3.12.7
Problem description
On windows 11 with python 3.12 I tried pyxform 2.2.0 and 2.2.1 with Java 8 and Java 21 and got the same error where the validation would fail for a valid xlsform but does not produce any error message. I dug into the code a little and was able to find the source of the problem.
In C:\Program Files\Python312\Lib\site-packages\pyxform\validators\util.py under function "run_popen_with_timeout" there the following call p = Popen( command, env=env, stdin=PIPE, stdout=PIPE, stderr=PIPE, startupinfo=startup_info ) which return a
return_code: 3221226505 when the env variable and command variables are as follow:
env: {'TEMP': 'C:\Users\serge\AppData\Local\Temp', 'TMP': 'C:\Users\serge\AppData\Local\Temp', 'TMPDIR': 'C:\Users\serge\AppData\Local\Temp'}
command: ['java', '-Djava.awt.headless=true', '-jar', 'C:\Program Files\Python312\Lib\site-packages\pyxform\validators\odk_validate\bin\ODK_Validate.jar', 'C:\Users\serge\AppData\Local\Temp\tmpila5ae4r']
If I call call p = Popen( command, env=None, stdin=PIPE, stdout=PIPE, stderr=PIPE, startupinfo=startup_info ) then the return code is 0 and everything works normally
If you need me to test other code to figure out why this is happening I can.
The text was updated successfully, but these errors were encountered: