Page 1 of 1

[SOLVED] “Returned non-zero exit status” error

Published: September 23, 2019 - 4:37 PM
by Gaetan
Hello everyone,
I'm trying to create a package using the DELL Command update.

Here is the code:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

CommandVendor = 'wmic systemenclosure get manufacturer'

Vendor = str(run(CommandVendor))

def install():

    if Vendor.find('Dell Inc.') != -1:
        print('installing tls-dell-command-update-3.0.1-a00')
        install_exe_if_needed("Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE",'/s',key='',min_version='3.0.1-a00')
This turns me on:

Code: Select all

2019-09-23 16:33:13,230 CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command '"Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s' returned non-zero exit status 2.
Output::
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 3846, in install_wapt
    exitstatus = setup.install()
  File "C:\waptdev\tls-dell-command-update-3.0.1-a00-wapt\setup.py", line 14, in install
    install_exe_if_needed("Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE",'/s',key='',min_version='')
  File "C:\Program Files (x86)\wapt\common.py", line 3802, in new_func
    return func(*args,**kwargs)
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 4227, in install_exe_if_needed
    run(r'"%s" %s' % (exe,silentflags),accept_returncodes=accept_returncodes,timeout=timeout,pidlist=pidlist)
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 1061, in run
    raise CalledProcessErrorOutput(proc.returncode,cmd,''.join(output))
CalledProcessErrorOutput: Command '"Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s' returned non-zero exit status 2.
Output:

FATAL ERROR : CalledProcessErrorOutput: Command '"Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s' returned non-zero exit status 2.
Output:
Exit code:  3
The error, if I'm not mistaken, indicates that the file does not exist.
I've searched high and low, but I can't understand the error.

If you have an idea.
THANKS

- Installed WAPT version (1.7)
- Linux server OS and CentOS 7 version
- Operating system of the administration machine/creation of Windows 10 packages

Re: "returned non-zero exit status" error

Published: September 26, 2019 - 11:18 AM
by sfonteneau
Hello,

the command "Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE" /s returns error code 2, a

non-standard code.

WAPT accepts 0 and 3010.

Re: "returned non-zero exit status" error

Published: September 26, 2019 - 1:50 PM
by Gaetan
Hello,
yes, I am aware of the codes accepted by WAPT and the meaning of code 2.
However, I don't understand why WAPT cannot complete the installation when it works via the command line and with other Dell software.
Is there a way to get a more verbose output?

Thank you.

Re: "returned non-zero exit status" error

Published: September 26, 2019 - 5:19 PM
by sfonteneau
Normally you have "Output:" at the end.

But it's quite possible that the output returns nothing.

2 might be a normal return code, and the software is properly installed.

Re: "returned non-zero exit status" error

Published: September 30, 2019 - 12:15 PM
by Gaetan
Good morning,
Yes, the package is indeed installed.
So I changed the code, adding a presence test in the process.
Here is the code:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

CommandVendor = 'wmic systemenclosure get manufacturer'

Vendor = str(run(CommandVendor))

def install():
    print('installing tls-dell-command-update-3.0.1-a00')

    if Vendor.find('Dell Inc.') != -1:
        if os.path.isdir('C:\Program Files\Dell\CommandUpdate') == False:
            install_exe_if_needed("Dell-Command-Update_Y2KWD_WIN_3.0.1_A00.EXE",'/s',key='',min_version='')
            print('Installé sur un PC DELL')
            pass
Thank you for your help ;)