[SOLVED] Problem with the get_file_association() function

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
Welsh
Messages: 15
Registration: December 6, 2022 - 9:44 AM

June 24, 2024 - 3:10 PM

Good morning,
I am contacting you because I have just noticed a problem with my infrastructure which no longer seems to recognize the get_file_association() function of the setuphelpers_windows.py library.
I noticed this problem because the OpenOffice 4.1.15 package refuses to install with the following error:

Code: Select all

Ligne de Commande : install "C:\waptdev\odlb-openoffice_4.1.15-21_windows_6.1_DEV_fr-wapt\WAPT\.."
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Installing WAPT files C:\waptdev\odlb-openoffice_4.1.15-21_windows_6.1_DEV_fr-wapt
2024-06-24 13:20:36,704 CRITICAL Fatal error in install script: NameError: name 'get_file_assocation' is not defined:
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 4235, in install_wapt
    exitstatus = setup.install()
  File "C:\waptdev\odlb-openoffice_4.1.15-21_windows_6.1_DEV_fr-wapt\setup.py", line 57, in install
    if get_file_assocation(".doc") is not None and get_file_assocation(".docx") is not None:
NameError: name 'get_file_assocation' is not defined

FATAL ERROR : NameError: name 'get_file_assocation' is not defined
Exit code:  3
I haven't found a solution. Seeing that there was an update to version 2.5.5, I thought, with a bit of luck, that would solve my problem ;)
The update went well, but the problem persists.
I think the problem will arise with other packages like LibreOffice. It's surprising; I haven't been informed of any problems with it.
So I look at how the libreoffice-fresh 7.6.4 package is formed and I see that it includes the declaration of the get_file_association() function, so the problem does not arise.
However, I can clearly see the get_file_association() function in the setuphelpers_windows.py file, I don't understand why it is not/no longer recognized.
I can work around the problem by adding the function to the openoffice package like libreoffice does, but maybe there's a problem higher up, right?
Do you have any idea?
Thanks in advance.
Baptiste
- 1 WAPT 2.5.5.15602 Enterprise server (3000 workstations) + 1 WAPT 2.4.0.14058 Enterprise server (10000 workstations)
- WAPT server OS: Linux REHL 8.7
- Administration/package creation machine OS: Windows Server 2019 v1809
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

June 25, 2024 - 09:26

Hello,

thank you for your feedback.

Indeed, in the new version of WAPT, we corrected the name of a function:

get_file_association -> get_file_association.

The packages have been corrected accordingly, but we had forgotten OpenOffice.

I have corrected the package; it is already on the store.

Simon
Welsh
Messages: 15
Registration: December 6, 2022 - 9:44 AM

June 25, 2024 - 09:33

Hello,
okay, I didn't see the change either and I didn't understand where the problem was coming from.
Thank you very much for your feedback as well. ;-)
You can close the topic, ;-)
Baptiste.
- 1 WAPT 2.5.5.15602 Enterprise server (3000 workstations) + 1 WAPT 2.4.0.14058 Enterprise server (10000 workstations)
- WAPT server OS: Linux REHL 8.7
- Administration/package creation machine OS: Windows Server 2019 v1809
Locked