Problem rendering with space in path

Hey guys,

I just tried to run the simulink example and got the error that it can´t find the path it is given. The problem is that is use MATLAB Drive as my main directory.

C:\Users<XXX>\MATLAB Drive…

Since there are missing quotes for the first input of the function, it wont work. Without the quotes it cant handle the space in “MATLAB Drive”.
I Fixed this by adding the quotes to the function render_file in render_acados_templates.m:
os_cmd = [’"’,t_renderer_location,’"’,’ “’,…
template_dir, '”’, ’ ', ‘"’, template_file, ‘"’, ’ ', ‘"’,…
json_fullfile, ‘"’, ’ ', ‘"’, out_file, ‘"’];

Hope this will help you, since a few people are using matlab drive I guess?

EDIT: This problem seems to happen more. Now Ive got an issue with make_sfun and mex. I am on it, I hope I can fix it. I am actually a beginner in Code GEN, happy for any help.

Greets,
Alex

Hi Alex,

I just ran into the same issues in an attempt to test things on Windows :see_no_evil:
I circumvented it by renaming the folder.

It seemed like you could fix a few issues here, if you can push the fixes and make a pull request to acados, I would appreciate it.

Best,
Jonathan

Hi FreyJo,

I couldnt solve the issue properly, since I had to go into the c templates which are being rendered. Tbh that was too much for me haha. I just reinstalled it and gave up. Sorry

Alex

Alright, lets say the solution is to not have a path with spaces.
It is anyway not good practice to have folder names with spaces.