Page 1 of 1

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

Published: January 4, 2024 - 9:24 PM
by Geoffroy
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

Re: FATAL ERROR: AttributeError: 'NoneType' object has no attribute 'package

Published: January 5, 2024 - 10:32 AM
by dcardon
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

Re: FATAL ERROR: AttributeError: 'NoneType' object has no attribute 'package

Published: January 8, 2024 - 3:26 PM
by Geoffroy
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')

Re: FATAL ERROR: AttributeError: 'NoneType' object has no attribute 'package

Published: January 10, 2024 - 10:51 AM
by jpele
Processed via WAPT Support.

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

Published: January 10, 2024 - 11:35 AM
by Geoffroy
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.