[SOLVED] Error line 3512 in install_wapt

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
renaud.counhaye
Messages: 31
Registration: December 13, 2017 - 11:45

October 15, 2018 - 11:28

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
Renaud Counhaye,
Network Systems Technician,
Central Functions Division
, Ymagis Group
Picture
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 15, 2018 - 8:28 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked