Lenty / SLiCAP_python

Open-source version of SLiCAP, implemented in python
Other
33 stars 15 forks source link

Whitespace in Maxima path error #48

Open Thomas-164 opened 8 months ago

Thomas-164 commented 8 months ago

When running the myFirstRCnetwork example the following error occurs:

PS C:\Users\name\myFirstRCnetwork> python .\myFirstRCnetwork.py
Succesfully self-tested the Maxima command.
SLiCAP Version matches with the latest release of SLiCAP on github.
Starting
Sarting Maxima client on port 53118
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

The problem for this is that maxima is installed in C:\Program Files\ and the whitespace is not correctly handled.

To fix this the following line needs to be changed: https://github.com/Lenty/SLiCAP_python/blob/4fedcdb5b40f244cb6e027b17fe639b9af76dcad/SLiCAP/SLiCAPpythonMaxima/SLiCAPpythonMaxima.py#L39 By putting quotes around the name the error is solved:

os.system('"' + self.maxima + '" -s ' + str(self.PORT))