Lenty / SLiCAP_python

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

error on installation #40

Open mimidbe opened 1 year ago

mimidbe commented 1 year ago

hello, i have an on installation with conda:

>python setup.py install --user
running install
..
..
..
..
The Maxima path found is: C:\maxima-5.47.0\bin\maxima.bat
Succesfully ran Maxima command
Acquiring LTSpice Command
LTSpice command set as: C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe
Found the LTSpice directory:  C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe
SLiCAP version: 1.6.0
ERROR: could not set install location.
Generating the configuration file
Found template file:  SLiCAPtemplate.py
Traceback (most recent call last):
  File "C:\SLiCAP\setup.py", line 222, in <module>
    setuptools.setup(
  File "C:\Anaconda3\envs\pytorch\lib\site-packages\setuptools\__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "C:\Anaconda3\envs\pytorch\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
    return run_commands(dist)
  File "C:\Anaconda3\envs\pytorch\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
    dist.run_commands()
  File "C:\Anaconda3\envs\pytorch\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "C:\Anaconda3\envs\pytorch\lib\site-packages\setuptools\dist.py", line 1208, in run_command
    super().run_command(command)
  File "C:\Anaconda3\envs\pytorch\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
    cmd_obj.run()
  File "C:\SLiCAP\setup.py", line 48, in run
    self._gen_config_file()
  File "C:\SLiCAP\setup.py", line 170, in _gen_config_file
    txt = txt.replace("$DOCPATH", self._doc_location)
TypeError: replace() argument 2 must be str, not None
>

the installation was attempted on windows 10. thank you in advance for your answer.

antonmontagne commented 1 year ago

I can't reproduce this error. Can you upgrade Python in Anaconda, and try to re-install it?

JokinSB commented 1 year ago

Hello @mimidbe,

Another user that I know has stumbled with a similar problem not so long ago. The error message that you show is due to an exception being thrown in a try...except block during the setup step in _set_install_location().

This exception can be caused by several calls, but most possibly comes either when removing the old SLiCAP install (like in the case that I've seen) or while copying the new files.

The way that we could walk around this problem was to restart the computer (to avoid stale file handlers), and then manually delete the SLiCAP folder to ensure the installer would find a clean SLiCAP home folder (in Windows it's usually located at C:\Users\your_username\SLiCAP). When that folder was manually removed, the installer was run again and succeeded.

Let us know if this method works for you! Cheers, Jokin