5. FAQ - Packages Issues¶
5.1. Updating WAPT packages from Python 2 to Python 3¶
Attention
With WAPT 2.0, the WAPT internals have switched to python3. WAPT packages MUST follow the new python3 syntax.
Syntax |
Python 2 |
Python 3 |
---|---|---|
|
|
|
unicode string |
|
|
operators |
|
|
Windows registry access |
|
|
Indication
For more details, visit:
5.2. Problems when creating a WAPT package¶
5.2.1. Problems with access rights and PyScripter¶
When trying to install a package from PyScripter, if the following message appears:

Launch PyScripter using a Local Administrator account and redo the desired action.
5.2.2. The WAPT package is too big and I can not upload it on the repository¶
When a package is too big, it is necessary to build the WAPT package locally then to upload it with WinSCP or an equivalent utility.
Build the WAPT package with PyScripter or manually build the package.
Indication
The WAPT package in C:\waptdev
.
Download and install WinSCP
Using WinSCP, upload the WAPT package in the correct repository location according to the version of the WAPT repository.
Once the upload has finished, recreate the
Packages
index file on the WAPT repository using the following command and remplacing repository by the repository location according to the version of the WAPT repository.
wapt-scanpackages repository
5.2.3. Access violation error while re-signing a WAPT package¶

If the Access violation error appear, it may mean that the WAPT package is too big.
Manually edit the package and visit this procedure for signing large WAPT packages.
5.2.4. WAPT package in error¶
5.2.4.1. Problem installing a WAPT package¶
I have a WAPT package that returns in error and the software is not installed on the computer when I physically go to check on the computer.
5.2.4.1.1. Explanation¶
An error has occurred during the execution of the setup.py
.
You can read and analyze error messages returned in the WAPT Console and try to understand and solve them.
The installation of the package will be retried at each upgrade cycle until the package does not return an error.
5.2.4.1.2. Solution¶
If WAPT returns an error code, research the error code on the Internet.
Example for a MSI: 1618: another installation in already running. Restarting the computer should solve the problem.
Note
MSI error codes are available by visiting this website.
Go to the computer and try to install the package with the WAPT command line utility. Then check that the software has installed.
Attention
Once the silent installation has finished, do nothing else.
The objective is to reproduce the behavior of the WAPT Agent.
If the package installs silently in user context, this may mean that the software installer does not work in SYSTEM context.
If it is still not working, launch the installation manually. It is possible for an error to appear explicitly describing the problem (ex: missing dependency, etc).
It is possible that the installer does not support installing over an older version of the software, so you will have to explicitly remove older versions of the application before installing the new one.
5.2.4.2. Error « timed out after seconds with output “600.0” »¶
Some packages return the following error in the WAPT Console:
"Error timed out after seconds with output '600.0'"
5.2.4.2.1. Explanation¶
By default, when installing a WAPT package embedding a run and a install_msi_if_needed command, WAPT will wait 600 seconds for the installer to finish its task.
If the installer has not finished in this delay, WAPT will stop the running installation.
5.2.4.2.2. Solution¶
If the software to be installed is known to be big (Microsoft Office, Solidworks, LibreOffice, Katia, Adobe Creative Suite), it is possible that the 600 second delay will be too short.
You will have to increase the timeout value, ex: timeout
= 1200
.
run('"setup.exe" /adminfile office2010noreboot.MSP', timeout = 1200)
5.2.4.3. Error « has been installed but the uninstall key can not be found »¶
Some WAPT packages return the following error in the WAPT Console:
XXX has been installed but the uninstall key can not be found.
5.2.4.3.1. Explanation¶
WAPT relies on Windows to install .msi binaries with install_msi_if_needed
and .exe binaries with install_exe_if_needed.
By default, WAPT accepts return codes 0 (OK) and 3010 (computer restart required) and it verifies that the uninstall key is present.
Unfortunately, we can not fully trust these return codes, so WAPT does additional checks after completing the installation to make sure that all has gone well:
It checks the presence of the uninstall key on the host.
It checks that the version number of the software is equal or greater than the version number in the
control
file.If this is not the case, it infers that the software may not be present on the host.
The function returns the WAPT package in error. The installation will be retried at every upgrade cycle until the WAPT package returns no error.
5.2.4.3.2. Solution¶
Attention
Before doing anything, it is advisable to go physically to the computer returning in error and to manually check whether the software has correctly installed. If the software has not installed correctly, refer to the section of this documentation on installing a package.
If the software has installed correctly, this may mean that the uninstall key or the software version in the package is not correct.
Retrieve the correct uninstall key and make changes to the WAPT package accordingly.
If the error happens when using the
install_msi_if_needed
function, this means that the MSI installer is badly packaged and that it is returning an incorrect uninstall key.
5.2.4.4. Error « has been installed and the uninstall key found but version is not good »¶
Some WAPT packages return the following error in the WAPT Console:
XXX has been installed and the *uninstall key* found but version is not good.
5.2.4.4.1. Explanation¶
When using install_msi_if_needed
or install_exe_if_needed
functions, additional checks are performed to make sure that all has gone well.
Attention
Before doing anything, it is advisable to go physically to the computer returning in error and to manually check whether the software has correctly installed. If the software has not installed correctly, refer to the section of this documentation on installing a package.
5.2.4.4.2. Solution: with install_msi_if_needed
¶
The informations being extracted from the MSI installer, this means that the MSI file does not return correct values or that the uninstall key is incorrect.
You can check using the Windows Command Line utility.
wapt-get list-registry
If the returned key is not that which has been entered in the install section of the setup.py
, it is not possible to use install_msi_if_needed
.
You MUST review the install section of your setup.py
, use the run()
function and manually manage exceptions.
5.2.4.4.3. Solution: with install_exe_if_needed
¶
This probably means that the version number entered in the install_exe_if_needed function is not correct. Make corrections to the WAPT package accordingly.
Note
If the min_version
argument has not been entered, WAPT will try to retrieve the version automatically from the .exe installer.
You can check the uninstall key and the version number using the command:
wapt-get list-registry
If no version is provided with the wapt-get list-registry command, this means that the software installer does not provide an uninstall key.
There are 2 solutions:
Use the argument
get_version
to provide the path to anotheruninstallkey
.
def install():
def versnaps2(key):
return key['name'].replace('NAPS2 ','')
install_exe_if_needed('naps2-5.3.3-setup.exe',silentflags='/VERYSILENT',key='NAPS2 (Not Another PDF Scanner 2)_is1',get_version=versnaps2)
Providing an empty value for
min_version
tells WAPT not to check for versions.
min_version=' '
Attention
With this method, versions are no longer checked during updates!
5.2.4.5. Error « DNSName values should be passed as an A-label string »¶
FATAL ERROR : ValueError: DNSName values should be passed as an A-label string. This means unicode characters should be encoded via a library like idna.
Ensure that your workstation name does not contain any special characters.