[SOLVED] Certificate package in error

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
eliottiph
Messages: 32
Registration: May 2, 2022 - 10:41

May 2, 2022 - 10:53

Good morning,

I am currently testing WAPT Enterprise on a demo license.

I created a group of certificate packages linked to my users, and when I try to deploy them, here is the error log I get:

Code: Select all

Installing cam-cert-adm-etiphaneau(=1.0-1)
Erreur lors de l'installation de ['cam-cert-adm-etiphaneau']: erreurs dans les paquets [[PackageRequest(package='cam-cert-adm-etiphaneau',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19043.2'),max_os_version=Version('10.0.19043.2')), PackageEntry('cam-cert-adm-etiphaneau','1.0-1' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5134, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4118, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 3967, in install_wapt\n    setup = import_setup(setup_filename)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 1539, in import_setup\n    py_mod = imp.load_source(modulename, setupfilename)\n  File "imp.py", line 171, in load_source\n  File "<frozen importlib._bootstrap>", line 702, in _load\n  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 839, in exec_module\n  File "<frozen importlib._bootstrap_external>", line 976, in get_code\n  File "<frozen importlib._bootstrap_external>", line 906, in source_to_code\n  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed\n  File "C:\\WINDOWS\\TEMP\\waptx4_cv5ls\\setup.py", line 24\n    print("Certificate %%s found" %% (crt_location))\n                                   ^\nSyntaxError: invalid syntax\n']]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1880, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 656, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1229, in _run
    raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['cam-cert-adm-etiphaneau']: erreurs dans les paquets [[PackageRequest(package='cam-cert-adm-etiphaneau',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19043.2'),max_os_version=Version('10.0.19043.2')), PackageEntry('cam-cert-adm-etiphaneau','1.0-1' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5134, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4118, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 3967, in install_wapt\n    setup = import_setup(setup_filename)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 1539, in import_setup\n    py_mod = imp.load_source(modulename, setupfilename)\n  File "imp.py", line 171, in load_source\n  File "<frozen importlib._bootstrap>", line 702, in _load\n  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 839, in exec_module\n  File "<frozen importlib._bootstrap_external>", line 976, in get_code\n  File "<frozen importlib._bootstrap_external>", line 906, in source_to_code\n  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed\n  File "C:\\WINDOWS\\TEMP\\waptx4_cv5ls\\setup.py", line 24\n    print("Certificate %%s found" %% (crt_location))\n                                   ^\nSyntaxError: invalid syntax\n']]

Exception: Erreur lors de l'installation de ['cam-cert-adm-etiphaneau']: erreurs dans les paquets [[PackageRequest(package='cam-cert-adm-etiphaneau',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19043.2'),max_os_version=Version('10.0.19043.2')), PackageEntry('cam-cert-adm-etiphaneau','1.0-1' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5134, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4118, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 3967, in install_wapt\n    setup = import_setup(setup_filename)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 1539, in import_setup\n    py_mod = imp.load_source(modulename, setupfilename)\n  File "imp.py", line 171, in load_source\n  File "<frozen importlib._bootstrap>", line 702, in _load\n  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 839, in exec_module\n  File "<frozen importlib._bootstrap_external>", line 976, in get_code\n  File "<frozen importlib._bootstrap_external>", line 906, in source_to_code\n  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed\n  File "C:\\WINDOWS\\TEMP\\waptx4_cv5ls\\setup.py", line 24\n    print("Certificate %%s found" %% (crt_location))\n                                   ^\nSyntaxError: invalid syntax\n']]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1880, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 656, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1229, in _run
    raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['cam-cert-adm-etiphaneau']: erreurs dans les paquets [[PackageRequest(package='cam-cert-adm-etiphaneau',architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19043.2'),max_os_version=Version('10.0.19043.2')), PackageEntry('cam-cert-adm-etiphaneau','1.0-1' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5134, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4118, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 3967, in install_wapt\n    setup = import_setup(setup_filename)\n  File "C:\\Program Files (x86)\\wapt\\waptutils.py", line 1539, in import_setup\n    py_mod = imp.load_source(modulename, setupfilename)\n  File "imp.py", line 171, in load_source\n  File "<frozen importlib._bootstrap>", line 702, in _load\n  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked\n  File "<frozen importlib._bootstrap_external>", line 839, in exec_module\n  File "<frozen importlib._bootstrap_external>", line 976, in get_code\n  File "<frozen importlib._bootstrap_external>", line 906, in source_to_code\n  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed\n  File "C:\\WINDOWS\\TEMP\\waptx4_cv5ls\\setup.py", line 24\n    print("Certificate %%s found" %% (crt_location))\n                                   ^\nSyntaxError: invalid syntax\n']]
WAPT2.2 ENTERPRISE, Debian 10 Linux Server, Windows 10 administration machine.

Thank you in advance for your feedback.
Last edited by eliottiph on May 2, 2022 - 11:48, edited 1 time.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

May 2, 2022 - 11:47

Hello,

there was an error in the latest version.

On your machine, you can patch the file: C:\Program Files (x86)\wapt\templates\setup_package_template_cert.py.tmpl.

In the file, you can replace the %% with % (double %% with single %).

Thank you for your feedback; I have just corrected it

. Regards
eliottiph
Messages: 32
Registration: May 2, 2022 - 10:41

May 2, 2022 - 12:15

Hello Mr. Fonteneau,

Thank you for your feedback.
The error persists despite modifying the file setup_package_template_cert.py.tmpl
Now my console crashes and disables the WAPT service on my Win10 console machine, which is also the machine where I test deployments. The machine goes into "DISCONNECTED" status, which forces me to reactivate it manually.
Log:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 3967, in install_wapt
    setup = import_setup(setup_filename)
  File "C:\Program Files (x86)\wapt\waptutils.py", line 1539, in import_setup
    py_mod = imp.load_source(modulename, setupfilename)
  File "imp.py", line 171, in load_source
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 839, in exec_module
  File "<frozen importlib._bootstrap_external>", line 976, in get_code
  File "<frozen importlib._bootstrap_external>", line 906, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\WINDOWS\TEMP\waptubbf04_n\setup.py", line 24
    print("Certificate %%s found" %% (crt_location))
                                   ^
SyntaxError: invalid syntax

SyntaxError: invalid syntax (setup.py, line 24)
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

May 2, 2022 - 1:48 PM

Yes, indeed, the patch allows you to correct the package during its creation

You can therefore delete the old certificate package from your private repository and then perform a 'forget' on the machine where the package had already been installed:

Code: Select all

wapt-get forget packagename
Right-click on the error package on the machine from the console and select "forget"

The error you describe, however, seems strange and is not related to the previous problem

Simon Fonteneau
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

May 5, 2022 - 7:23 PM

Hello,

the package template for the certificate package has been fixed in today's latest release bugfix wapt-2.2.1.11932-6522dccb.

Regards,

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