Page 1 of 1

[SOLVED] Error line 3512 in install_wapt

Published: October 15, 2018 - 11:28 AM
by renaud.counhaye
Hello everyone,

Since updating to WAPT 1.6, the 7zip package tends to fail during installation with this output:

uninstalling 7-Zip 9.20 (x64 edition)
Traceback (most recent call last):
File "c:\wapt\common.py", line 3512, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\wapt6e8_dt\setup.py", line 42, in install

The code for the Python package from wapt.lesfourmisduweb.org:

Code: Select all

def install():
    global uninstallkey
    from common import Wapt

    broken_7zip = [ soft for soft in installed_softwares('7-zip') if Version(soft['version']) < Version('16.0') ]
    if broken_7zip:
        for uninstall in broken_7zip:
            cmd = WAPT.uninstall_cmd(uninstall['key'])
            print(u'uninstalling %s' % (uninstall['name'],))
            # on execute la commande de desinstallation
            run(cmd)

    allmsi = glob.glob('*-x64.msi')
    for msi in allmsi:
        if iswin64():
            install_msi_if_needed(msi,killbefore=['7zFM.exe'])
        else:
            install_msi_if_needed(msi.replace('-x64.msi','.msi'),killbefore=['7zFM.exe'])

    for ext in ('.001','.7z','.arj','.bz2','.bzip2','.cab','.cpio','.deb','.dmg','.fat',
            '.gz','.gzip','.hfs','.iso','.lha','.lzh','.lzma','.ntfs','.rar','.rpm',
            '.squashfs','.swm','.tar','.taz','.tbz','.tbz2','.tgz','.tpz','.txz','.vhd',
            '.wim','.xar','.xz','.z','.zip', '.zipe'):
        register_ext('7-zip',ext,'"%s" "%%1"' % (makepath(programfiles,'7-zip','7zFM.exe'),),icon="%s,1" % (makepath(programfiles,'7-zip','7z.dll')))

""" You can do a CTRL F9 in pyscripter to update the package """
When in doubt, I'm just going to leave it out and replace it with simply:

Code: Select all

if iswin64():
        install_msi_if_needed('7z1805-x64.msi',killbefore=['7zFM.exe'])
    else:
        install_msi_if_needed('7z1805.msi',killbefore=['7zFM.exe'])

    for ext in ('.001','.7z','.arj','.bz2','.bzip2','.cab','.cpio','.deb','.dmg','.fat',
            '.gz','.gzip','.hfs','.iso','.lha','.lzh','.lzma','.ntfs','.rar','.rpm',
            '.squashfs','.swm','.tar','.taz','.tbz','.tbz2','.tgz','.tpz','.txz','.vhd',
            '.wim','.xar','.xz','.z','.zip', '.zipe'):
        register_ext('7-zip',ext,'"%s" "%%1"' % (makepath(programfiles,'7-zip','7zFM.exe'),),icon="%s,1" % (makepath(programfiles,'7-zip','7z.dll')))
But perhaps an expert eye will find the bug :)

Sincerely,
Renaud

Re: Error line 3512 in install_wapt

Published: October 15, 2018 - 8:28 PM
by dcardon
Good evening Renaud,
renaud.counhaye wrote: Oct 15, 2018 - 11:28 Since updating to WAPT 1.6, the 7zip package tends to fail during installation with this output:

Code: Select all

uninstalling 7-Zip 9.20 (x64 edition)
Traceback (most recent call last):
  File "c:\wapt\common.py", line 3512, in install_wapt
    exitstatus = setup.install()
  File "c:\windows\temp\wapt6e8_dt\setup.py", line 42, in install
According to the error message above, the problem occurs when uninstalling outdated versions of 7-Zip 9.20. This version doesn't update correctly; it needs to be uninstalled beforehand, otherwise you'll have leftover files. The real issue is why it's not uninstalling properly (a `kill_before` command or equivalent would likely be needed if the software was running during the uninstallation process).

Sincerely,

Denis