[SOLVED] Pyscripter - WAPT:install - Fatal 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
User avatar
CasseThor
Messages: 22
Registration: December 1, 2017 - 9:25 PM

March 28, 2023 - 11:48

Good morning,
I wanted to give you feedback on a problem (which may not actually be one)

I created an .msi package and I'm getting this information from the console:

Code: Select all

2023-03-28 11:28:16,883 CRITICAL Fatal error in install script: AttributeError: module '__waptsetup_sr4h0t49hx__' has no attribute 'install':
Traceback (most recent call last):
  File "C:\wapt\common.py", line 4074, in install_wapt
    exitstatus = setup.install()
AttributeError: module '__waptsetup_sr4h0t49hx__' has no attribute 'install'
The manual package installation went smoothly
If I use the WAPT function: session-setup, I no longer get an error

Here is the script in question:

Code: Select all

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

print('installation de Impact9')
run(r'impact9.msi /qn')
#print('installation de la licence')
#install_msi_if_needed('impact9_lic.msi' )
#run_notfatal(r'impact9.msi /q /norestart',timeout=1200)
I tried several installations, as you can see.

However, if I send the installation of this package to a remote machine, I get the same error:

Code: Select all

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1907, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 710, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1282, in _run
    raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['iut-impact907(=9.0.0.0-5)']: erreurs dans les paquets [[PackageRequest(package='iut-impact907',version=(Version('9.0.0.0'), 5),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.22621.1413'),max_os_version=Version('10.0.22621.1413')), PackageEntry('iut-impact907','9.0.0.0-5' maturity='PROD'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5193, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4167, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4074, in install_wapt\n    exitstatus = setup.install()\nAttributeError: module \'__waptsetup_m4ojr8c7v2__\' has no attribute \'install\'\n']]

Exception: Erreur lors de l'installation de ['iut-impact907(=9.0.0.0-5)']: erreurs dans les paquets [[PackageRequest(package='iut-impact907',version=(Version('9.0.0.0'), 5),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.22621.1413'),max_os_version=Version('10.0.22621.1413')), PackageEntry('iut-impact907','9.0.0.0-5' maturity='PROD'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5193, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4167, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4074, in install_wapt\n    exitstatus = setup.install()\nAttributeError: module \'__waptsetup_m4ojr8c7v2__\' has no attribute \'install\'\n']]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1907, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 710, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1282, in _run
    raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['iut-impact907(=9.0.0.0-5)']: erreurs dans les paquets [[PackageRequest(package='iut-impact907',version=(Version('9.0.0.0'), 5),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.22621.1413'),max_os_version=Version('10.0.22621.1413')), PackageEntry('iut-impact907','9.0.0.0-5' maturity='PROD'), 'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 5193, in install\n    result = self.install_wapt(p.localpath,\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4167, in install_wapt\n    raise e\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4074, in install_wapt\n    exitstatus = setup.install()\nAttributeError: module \'__waptsetup_m4ojr8c7v2__\' has no attribute \'install\'\n']]
Last edited by CasseThor on March 29, 2023 - 3:49 PM, edited 1 time.
User avatar
CasseThor
Messages: 22
Registration: December 1, 2017 - 9:25 PM

March 28, 2023 - 11:50

I should point out that the package on the computer does install correctly :)
. Regards
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 28, 2023 - 3:09 PM

I think one is missing

Code: Select all

def install():


:-)

There's a wizard in the console to prepare a package; it's quite handy as it automatically creates the package skeleton.

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
User avatar
CasseThor
Messages: 22
Registration: December 1, 2017 - 9:25 PM

March 29, 2023 - 3:49 PM

Ah, thank you, but... no, something else must have been missing. :)

Anyway, I followed your advice to use a clean database with the wizard, and everything works!

Thank you. :D
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 29, 2023 - 5:32 PM

Thanks for the feedback, CasseThor. :-)
I'm locking the thread.
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