Error Running the examples -subprocess.CalledProcessError
Greenhorno90 opened this issue · 7 comments
Hello,
when I try to run the examples I get this error message:
subprocess.CalledProcessError: Command 'ccx -version; exit 0' returned non-zero exit status 201.
Hi,
If you answer the below questions I can help resolve the issue.
- What operating system are you using?
- Is it 32 bit or 64 bit?
- If you run
ccx
from the terminal or command prompt what does it say? - What version of pycalculix are you using?
- Did you previously run
pycalculix-add-feaprograms
?
Hello,
thank you for your fast reply. To the questions:
- Windows 7
- 64 bit
- Ccx is running without any error in the windows commandline, running the python code, the resultfile .frd is safed but program fails right after that step
- 0.9.5, installed yesterday in the command line
- During installation yesterday
Thank you and best regards!
Hi @Greenhorno90 thank you for providing the above info. Please paste the results that are printed when you run ccx -version; exit 0
in the terminal. My guess is that the function which checks which version of ccx is being used is not working here: https://github.com/spacether/pycalculix/blob/master/pycalculix/results_file.py#L1101
Hi, here is the result I when I run ccx -version; exit 0
This is Version 2.12
Regards,
Hi,
the problem seems to be located here:
" if check and retcode:
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr) "
check is true and retcode 201
Executing 2 commands in windows cmd is done by: &
thus, correction as follows should fix the problem:
"
def check_ccx_version(self, timeout=1):
"""Raises an exception of the calculix ccx version is too old"""
runstr = "%s -version & exit 0" % (environment.CCX)
....
"
I have verified that running the tests in the new branch https://github.com/spacether/pycalculix/tree/bug/windows_fixes works
Issue is fixed in version 1.1.0