Page 1 of 1
[SOLVED] ImportError: No module named requests
Published: September 26, 2018 - 5:12 PM
by agatoi
Good morning,
Logged in as a local administrator (Windows 7 32-bit), I'm trying to create a new Wapt package. When I try to launch the installation from PyScripter, I get this error:
Code: Select all
Traceback (most recent call last):
File "C:\Program Files\wapt\wapt-get.py", line 24, in <module>
from waptutils import __version__
File "C:\Program Files\wapt\waptutils.py", line 42, in <module>
import requests
ImportError: No module named requests
Just in case, I reinstalled the client, but without any further result.
Re: ImportError: No module named requests
Published: September 26, 2018 - 6:32 PM
by sfonteneau
I've had this happen before. It seems that sometimes the waptsetup installation doesn't copy everything.
You can try reinstalling waptsetup:
https://wapt.tranquil.it/wapt/releases/ ... tsetup.exe
Re: ImportError: No module named requests
Published: October 2, 2018 - 2:31 PM
by agatoi
It doesn't work.
Furthermore, I have the same problem on another machine (a "fresh" installation of wapt on a machine just deployed by FOG).
Re: ImportError: No module named requests
Published: October 2, 2018 - 2:45 PM
by htouvet
This is a symptom of an interrupted installation.
Common causes include:
* Two concurrent installations... (for example, an automatic upgrade scheduled by a task and an installation via GPO...)
* An antivirus program blocking file copying
, or perhaps
* an old installation in the PATH? But on a new machine, it can't be that.
Re: ImportError: No module named requests
Published: October 2, 2018 - 3:12 PM
by agatoi
The installation is done via GPO (waptdeploy), and there's no antivirus software on the machine.
If I understand correctly, this module normally consists of Python files stored in C:\Program Files\wapt\lib.
If that's the case, even using the file provided by Simon, this module is missing.
Re: ImportError: No module named requests
Published: October 2, 2018 - 7:47 PM
by dcardon
Hello Agatoi,
agatoi wrote: ↑Oct 2, 2018 - 3:12 PM
The installation is done via GPO (waptdeploy) and there is no antivirus software on the machine.
If I understand correctly, this module normally consists of Python files stored in C:\program files\wapt\lib.
If that's the case, even using the file provided by Simon, this module is missing.
If you manually install the agent on the problematic machine, does that resolve the issue? Does the WAPT installation GPO run at startup or shutdown?
Sincerely,
Denis
Re: ImportError: No module named requests
Published: October 3, 2018 - 10:09 AM
by agatoi
It doesn't get better: once waptsetup is reinstalled (manually, on non-domain machines), the machines do appear in the console.
But as soon as I try to assign packages to it (python27 and waptdev): 0 actions launched, 1 error, 0 skipped, 0 server error.
And the status icon changes to "running"
This happened both with my own Waptsetup and with the one provided by Simon.
In the client log files I have:
Code: Select all
Error getting Packages index from https://"nom serveur wapt".local/wapt-host : EWaptCertificateUnknownIssuer: None of certificates (""nom serveur wapt".fr",""nom serveur wapt".fr") are trusted.
Get packages index
2018-10-03 10:27:19,289 CRITICAL Error getting Packages index from https://"nom serveur wapt".local/wapt-host : EWaptCertificateUntrustedIssuer: None of certificates (""nom serveur wapt".fr",""nom serveur wapt".fr") are trusted.
Re: ImportError: No module named requests
Published: October 3, 2018 - 11:26 AM
by htouvet
This means that the certificate /key used to
sign packets (especially machine configuration, which is signed by your verified key and can be verified with your certificate)
and to sign actions sent to workstations (when you trigger an update)
is not the one you distributed to your workstations (located in c:\program files (x86)\wapt\ssl).
Check the information displayed in your console under Tools / Preferences / Personal Certificate Path.
This must be the same certificate as the one on the workstations.
Re: ImportError: No module named requests
Published: October 3, 2018 - 1:29 PM
by agatoi
Indeed, for this specific error (running), there was a certificate problem, which has now been corrected.
I was able to install the previously mentioned packages (python27 and waptdev) to test the development on other machines.
But the error is still there (ImportError: No module named requests)
If you manually install the agent on the machine that has the problem, does that solve the issue?
Unfortunately not
Does the WAPT installation GPO run at startup or at shutdown?
The GPO runs at startup.
Re: ImportError: No module named requests
Published: October 3, 2018 - 3:35 PM
by agatoi
It seems to be working now, without having done anything additional since my last message.
Here's a summary for anyone who might need it:
Error: ImportError: No module named requests.
Resolution (??):
Update the server, then the console (waptsetup.exe).
Paste the private key (from the Private folder) into C:\Program Files\wapt\ssl.
Generate a new agent (if using GPO, don't forget the hash).
Update the machine where the console is installed.
Thanks to the team for their support.