[SOLVED] FATAL ERROR: AttributeError: 'NoneType' object has no attribute 'package

Share your tips or issues concerning the WAPT Console or WAPT Agent here
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
Answer
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

January 4, 2024 - 9:24 PM

Hello everyone.

First of all, a happy and prosperous new year to everyone.

Environment :

Server: WAPT Enterprise 2.4.0.14080 on Debian
Consoles: Windows 10 & 11
Park: Windows

We have a package that works perfectly across our entire network, however on one PC we get this error.

Code: Select all

 CRITICAL Package questeducation-Microsoft-Visual-Studio-Community-QuestEducation [x64_fr_PROD] not installed due to errors : TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Results :

 === install packages ===
  questeducation-Microsoft-Visual-Studio-Community-QuestEducation [x64_fr_PROD] | questeducation-Microsoft-Visual-Studio-Community-QuestEducation (17.7.34031.279-4)
FATAL ERROR : AttributeError: 'NoneType' object has no attribute 'package'
If you have a lead.
I'm going to try a few things on the computer and I'll keep you informed if the problem is solved
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

January 5, 2024 - 10:32

Hello Geoffroy,

Happy New Year 2024!

It seems that in your package you're calling a filesystem path that doesn't exist on the machine... Do you have the contents of setup.py? Could the machine be running a 32-bit system?

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
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

January 8, 2024 - 3:26 PM

Hello Denis,

The PC is indeed x64-based; here is the Setup.py file

Code: Select all

def install():
    # Declaring local variables

    # Installing the software
    print("Installing: vs_setup.exe")
    install_exe_if_needed('vs_setup.exe', timeout=3000,
    silentflags='--nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended;includeOptional --add Microsoft.VisualStudio.Workload.NativeGame;includeRecommended;includeOptional --add Microsoft.VisualStudio.Workload.NativeMobile;includeRecommended;includeOptional --add Microsoft.VisualStudio.Workload.ManagedGame;includeRecommended;includeOptional --quiet --norestart',
    )

    import shutil

    src_path = 'Visual Studio 2022.lnk'
    dst_path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
    shutil.copy2 (src_path, dst_path)
    print('Copied')

    import shutil

    src_path = 'Visual Studio Installer.lnk'
    dst_path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
    shutil.copy2 (src_path, dst_path)
    print('Copied')

    import shutil

    src_path = 'Visual Studio 2022.lnk'
    dst_path = "C:\\Users\\Public\\Desktop"
    shutil.copy2 (src_path, dst_path)
    print('Copied')
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
User avatar
jpele
Messages: 156
Registration: March 4, 2019 - 12:01
Location: Nantes

January 10, 2024 - 10:51

Processed via WAPT Support.
User avatar
Geoffroy
Messages: 75
Registration: June 28, 2022 - 3:34 PM

January 10, 2024 - 11:35

After contacting support, they didn't clearly explain the problem.

On my end, I tried several installations via the console and command line on the machine, using something like

`wapt-get install nondu package --force`. It re-downloads the package, but not completely, leaving a partial file in the cache folder.

I had to download the package separately and run the installation for it to work.

I'm not really explaining the problem, especially since it only affects one machine.
Server: WAPT Enterprise 2.6.0.17226 on Debian 12;
Consoles: Windows 11
; Infrastructure: Windows
Answer