CpoException: Executable file should be given in 'execfile' context attribute

the line in question that is giving me problems is the following:

msol = mdl.solve(TimeLimit=20, trace_log=False, execfile='\Applications\CPLEX_Studio_Community201\cpoptimizer\bin\x86-64_osx\cpoptimizer.exe')

Producing the following exception:

docplex.cp.utils.CpoException: Executable file should be given in 'execfile' context attribute.code

I specified the path of the cpoptimizer.exe file so I'm unsure as to why it's not being read.

Thank you in advance


I am not sure on MacOS the executable name ends with .exe, it should be cpoptimizer.

And also the path separarators is / instead of \

so execfile='/Applications/CPLEX_Studio_Community201/cpoptimizer/bin/x86-64_osx/cpoptimizer' might work