[SOLVED] Restore packages

Questions about WAPT Server / Requests and help related to the WAPT server
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
User avatar
Mathieu
Messages: 91
Registration: August 18, 2016 - 10:24

September 5, 2018 - 1:57 PM

Good morning,

I just reinstalled my server because I was on a nightly version, once the installation was done I wanted to do the restoration as in the procedure via the command /usr/bin/python /opt/wapt/wapt-scanpackages.py /var/www/wapt/ except that I get an error message.

Code: Select all

/usr/bin/python /opt/wapt/wapt-scanpackages.py /var/www/wapt/
Traceback (most recent call last):
  File "/opt/wapt/wapt-scanpackages.py", line 32, in <module>
    from waptutils import __version__,setloglevel
  File "/opt/wapt/waptutils.py", line 41, in <module>
    import requests
ImportError: No module named requests
How to continue the procedure

Thank you
Last edited by Mathieu on 05 Sep 2018 - 15:46, edited 1 time.
- WAPT 2.2.3.12463 Enterprise
- Debian 9.9
- Windows 10 21H2 & Windows 11 22h2
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

September 5, 2018 - 3:34 PM

simply do

Code: Select all

wapt-scanpackages /var/www/wapt
Normally the wapt-scanpackages script is in /usr/lbin, so in the path

The error stems from the fact that wapt now has its own 'virtualenv' for the server as well.
The Python libraries (requests, for example) are located in /opt/wapt, and this location must be declared before running the wapt-scanpackages.py Python script. This is what /usr/bin/wapt-scanpackages does

Code: Select all

#!/bin/bash
sudo -u wapt PYTHONHOME=/opt/wapt PYTHONPATH=/opt/wapt /opt/wapt/bin/python /opt/wapt/wapt-scanpackages.py $@
Tranquil IT
User avatar
Mathieu
Messages: 91
Registration: August 18, 2016 - 10:24

September 5, 2018 - 3:45 PM

Thank you

, we'll need to look into modifying your procedure:
https://www.wapt.fr/fr/doc/waptserver_b ... stauration
- WAPT 2.2.3.12463 Enterprise
- Debian 9.9
- Windows 10 21H2 & Windows 11 22h2
Locked