Page 1 of 1

Operand type problem on remove_desktop_shortcut

Published: April 21, 2020 - 10:49 AM
by jlatieule
Good morning,


I am looking to automate the deletion of a shortcut by retrieving the name of the software present in the control file.

Code: Select all

    nom_salvia = control.description.split(' ', )[-1]
    print nom_salvia

    # Suppression raccourci bureau public
    remove_desktop_shortcut('%s') % nom_salvia
I received the following error message
2020-04-21 10:45:00,736 CRITICAL Fatal error in uninstall function: TypeError: unsupported operand type(s) for %: 'NoneType' and 'unicode':
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\waptpackage.py", line 2316, in call_setup_hook
hookdata = hook_func()
File "c:\waptdev\ophlm-salvia-financements-wapt\setup.py", line 44, in uninstall
remove_desktop_shortcut('%s') % salvia_name
TypeError: unsupported operand type(s) for %: 'NoneType' and 'unicode'
I tried different methods, all of which turned out to be wrong.
How can this problem be solved?

Thank you in advance

Sincerely

Re: Operand type problem on remove_desktop_shortcut

Published: April 21, 2020 - 5:58 PM
by sfonteneau
I'm opening a ticket with us because there is indeed a problem when using the "description" of the control object in uninstall.

The value is None.

Re: Operand type problem on remove_desktop_shortcut

Published: April 30, 2020 - 10:55 AM
by jlatieule
It works, now we just have to wait for the fix.

Thanks again.