Page 1 of 1

[SOLVED] Office package uninstallation error

Published: June 26, 2018 - 10:04 AM
by louisinger
Good morning,

I'm stuck trying to uninstall my Office Pro+ 2016 package. The installation goes smoothly, but when I try to uninstall it, things get complicated. I get this CRITICAL ERROR:

Error running uninstall script: No module named setup

Here is more precisely what the command returns wapt-get remove mnt-microsoft-office :

Code: Select all

PS C:\Users\louisinger> wapt-get remove mnt-microsoft-office
2018-06-26 09:36:53,338 INFO User Groups:[]
2018-06-26 09:36:53,339 DEBUG WAPT base directory : C:\Program Files (x86)\wapt
2018-06-26 09:36:53,341 DEBUG Package cache dir : C:\Program Files (x86)\wapt\cache
2018-06-26 09:36:53,342 DEBUG WAPT DB Structure version;: 20180303
2018-06-26 09:36:53,342 DEBUG Checking if old install in progress
2018-06-26 09:36:53,349 DEBUG Thread 4264 is connecting to wapt db
2018-06-26 09:36:53,351 DEBUG DB Start transaction
2018-06-26 09:36:53,351 DEBUG reset stalled install_status in database
2018-06-26 09:36:53,354 INFO Status :
2018-06-26 09:36:53,355 DEBUG DB commit
Removing mnt-microsoft-office ...
2018-06-26 09:36:53,364 INFO Status : Removing package mnt-microsoft-office version 16.0.8431.2270-69 from computer...
2018-06-26 09:36:53,365 DEBUG DB Start transaction
2018-06-26 09:36:53,365 DEBUG DB commit
2018-06-26 09:36:53,390 DEBUG uninstall key not registered in local DB status.
2018-06-26 09:36:53,391 INFO setup.uninstall for package mnt-microsoft-office with params {}
2018-06-26 09:36:53,391 DEBUG Sourcing setup from DB
2018-06-26 09:36:53,394 DEBUG Import source code as __waptsetup_6mtn83wm6i__
2018-06-26 09:36:53,397 DEBUG   Change current directory to C:\Users\louisinger
2018-06-26 09:36:53,397 CRITICAL Error running uninstall script: No module named setup
2018-06-26 09:36:53,398 INFO Remove status record from local DB for mnt-microsoft-office
2018-06-26 09:36:53,398 DEBUG DB Start transaction
2018-06-26 09:36:53,401 DEBUG DB commit
2018-06-26 09:36:53,407 INFO Additional packages to remove : []
2018-06-26 09:36:53,411 DEBUG Check if host package "D7BC2042-E8CF-9038-A64E-43C177B5E03B" is available
2018-06-26 09:36:53,414 DEBUG Checking if D7BC2042-E8CF-9038-A64E-43C177B5E03B (=56) is installed/outdated
2018-06-26 09:36:53,440 DEBUG store status in DB
2018-06-26 09:36:53,440 DEBUG DB Start transaction
2018-06-26 09:36:53,443 DEBUG DB commit
2018-06-26 09:36:53,448 INFO Status :
2018-06-26 09:36:53,450 DEBUG DB Start transaction
2018-06-26 09:36:53,450 DEBUG DB commit
=== Removed packages ===
  mnt-microsoft-office
=== Error removing packages ===
  mnt-microsoft-office
2018-06-26 09:36:53,461 DEBUG Starting new HTTPS connection (1): srvwaptprd.mnt.fr
2018-06-26 09:36:53,493 DEBUG https://srvwaptprd.mnt.fr:443 "HEAD /ping HTTP/1.1" 200 0
2018-06-26 09:36:53,549 DEBUG Unable to GET username from SID S-1-5-21-259322336-1362810705-2350445518-1000 : (1332, 'Lo
okupAccountSid', 'Le mappage entre les noms de compte et les ID de s\xe9curit\xe9 n\x92a pas \xe9t\xe9 effectu\xe9.'), u
sing profile directory instead
2018-06-26 09:36:53,759 DEBUG Starting new HTTPS connection (1): srvwaptprd.mnt.fr
2018-06-26 09:36:53,854 DEBUG https://srvwaptprd.mnt.fr:443 "POST /update_host HTTP/1.1" 200 172
2018-06-26 09:36:53,855 DEBUG DB Start transaction
2018-06-26 09:36:53,858 DEBUG DB commit
2018-06-26 09:36:53,864 INFO Status on server https://srvwaptprd.mnt.fr updated properly
2018-06-26 09:36:53,865 DEBUG update_server_status successful {u'msg': u'update_host', u'result': {u'computer_fqdn': u'd
054e104.mnt.fr', u'uuid': u'D7BC2042-E8CF-9038-A64E-43C177B5E03B'}, u'success': True, u'request_time': 0.062999963760375
98}
WAPT finds the setup.py module during installation but not during uninstallation.
The thing that seems strange to me is this famous Change current directory to C:\Users\louisinger just before the mistake.

Does anyone have a solution or a suggestion?

-------------------------
My setup:

WAPT version: 1.5
Development computer operating system: Windows 10
Server: Debian 9

Re: Office package uninstallation error

Published: July 4, 2018 - 12:06 PM
by louisinger
No one to help me?

Re: Office package uninstallation error

Published: July 11, 2018 - 10:55 AM
by htouvet
Change current directory to C:\Users\louisinger
This is normal. During installation, the current directory changes to the temporary directory where the package is unzipped.
At the end of the procedure (including when there is an error), the previous current directory is restored.
That's not the problem.

During the "uninstall" procedure, the setup module is read from the local wapt database (because the .wapt package in zip format is no longer present on the machine at that time)

The error mentioned may refer to:
Revision: 5e66fe47ee9e1dda56cc10f70abe3be1ebe902ce
Author: htouvet <htouvet-github@tranquil.it>
Date: 07/12/2017 19:06:11
Message:
...
----
Modified: common.py
...
What version of Wapt is it?
(see the hash in c:\program files (x86)\wapt\revision.txt)

What is the content of your uninstall() function?

Re: Office package uninstallation error

Published: July 11, 2018 - 11:48 AM
by louisinger
Hello,

I solved the problem two days ago. It was apparently an import issue :? .
I simply cleaned up my imports and miraculously it worked. I think it's the infamous circular import problem in Python: https://gist.github.com/datagrok/40bf84d5870c41a77dc6

I'm marking this as [RESOLVED]. Thank you.