Skip to content
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

Release 3.2.0 produces [WinError 193] %1 is not a valid Win32 application #128

Open
barban-dev opened this issue Nov 8, 2020 · 0 comments

Comments

@barban-dev
Copy link

Hi,
I get the error in subject on Release 3,2,0 when calling "omc = OMCSessionZMQ()".
The error does not appear using Release 3.1.2.

Difference is in the use of "shell=True" param in _start_omc_process(self):
Release 3.2.0:
self._omc_process = subprocess.Popen(self._omc_command, stdout=self._omc_log_file, stderr=self._omc_log_file, env=my_env)
Release 3.1.2:
self._omc_process = subprocess.Popen(self._omc_command, , shell=True. stdout=self._omc_log_file, stderr=self._omc_log_file, env=my_env)
To avoid this error in Release 3.2.0 (where shell=True is not used), pathname should not be included in self._omc_command (path for omc executable is already present in the PATH environment variable):

subprocess.call(['E:\\OpenModelica1.14.1-64bit\\bin\\omc', '--interactive=zmq', '+z=cb80c01b43984c4285cf60ffd9b66294'])
--> [WinError 193] %1 is not a valid Win32 application

subprocess.call(['omc', '--interactive=zmq', '+z=cb80c01b43984c4285cf60ffd9b66294'])
--> OK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant