Hello Ingrid,
Sorry for the late reply, I couldn't do it sooner :-/ . Thank you for your help.
It turns out that uninstalling my package didn't actually work either! (I hadn't noticed it in PyScripter.) I'm getting the same error, but this time with a much more explicit log:
Code: Select all
list index out of range
Traceback (most recent call last):
File "<string>", line 1662, in run
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 885, in run
self._run()
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1513, in _run
self.result = self.wapt.remove(self.packagenames,
File "C:\Program Files (x86)\wapt\common.py", line 5966, in remove
self.uninstall(package)
File "C:\Program Files (x86)\wapt\common.py", line 7559, in uninstall
entry.call_setup_hook('uninstall', self, params=params,force=force)
File "C:\Program Files (x86)\wapt\waptpackage.py", line 2994, in call_setup_hook
setup = import_code(setuppy)
File "C:\Program Files (x86)\wapt\waptutils.py", line 1638, in import_code
exec(code, module.__dict__)
File "<string>", line 31, in <module>
IndexError: list index out of range
This allowed me to find the error. The installation file name (setup_file) was in the global variables of the setup.py file, and even after importing the glob module into setup.py, the error still occurred. I moved this line into the install() function:
Code: Select all
def install():
setup_file=glob.glob("Setup_EP*.exe")[0]
#installation du logiciel
install_exe_if_needed(
setup_file,
silentflags=r'/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS /DIR="C:\EduPython"',
key="EduPython_%s_is1" % control.get_software_version(),
min_version=control.get_software_version(),
timeout=900,
)
Now everything works.
Sincerely