Error creating WAPTAGENT

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
avondra
Messages: 35
Registration: Nov 9, 2016 - 12:02

November 21, 2016 - 5:39 PM

making slow but steady progress...
I'm now encountering an error during package installation:
The clients are correctly installed via GPO and are reporting correctly, but when installing the packages, I get this message: `

File "C:\Program Files (x86)\wapt\common.py", line 2430, in update_host
host_package_date = httpdatetime2isodate(host_request.headers.get('last-modified',None))
File "C:\Program Files (x86)\wapt\setuphelpers.py", line 3557, in httpdatetime2isodate
return datetime2isodate(datetime.datetime(*email.utils.parsedate(httpdate)[:6]))
TypeError: 'NoneType' object has no attribute '__getitem__'`

Do you have any ideas?
Thanks
avondra
Messages: 35
Registration: Nov 9, 2016 - 12:02

November 22, 2016 - 10:25

Hello,
I suspect the problem I'm encountering is still related to the installation path in the Windows "Program Files (x86)" directory. Do all Python files need to be patched?
This message appears when I double-click the client on which I want to apply software deployment or updates.
I thought that support for the "Program Files (x86)" directory was integrated into current versions of WAPT.
Am I mistaken?
Thank you for your help,
Alain
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

November 22, 2016 - 2:47 PM

I think this is a different type of bug, unrelated to spaces in the program files path.
The /var/www/wapt-host directory doesn't contain the Packages index.

I suggest you run the following command on the server:
python /opt/wapt/wapt-scanpackages.py /var/www/wapt-host

, which should create an empty Packages file.
Tranquil IT
avondra
Messages: 35
Registration: Nov 9, 2016 - 12:02

November 22, 2016 - 5:06 PM

I successfully ran the Python command, but for /var/www/html/wapt-host, I now have an icons/ directory and a Packages file. However, I still get this error when I double-click on a machine:

File "C:\Program Files (x86)\wapt\setuphelpers.py", line 3557, in httpdatetime2isodate
return datetime2isodate(datetime.datetime(*email.utils.parsedate(httpdate)[:6]))
TypeError: 'NoneType' object has no attribute '__getitem__'

Have I missed something?
Thank you.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

November 25, 2016 - 7:29 PM

Currently, wapt has difficulty functioning in the Program Files directory.

This will be fixed in future versions.

For now, it is best to install wapt in c:\wapt
avondra
Messages: 35
Registration: Nov 9, 2016 - 12:02

November 26, 2016 - 8:35 PM

I reinstalled it in C:\wapt and I'm getting the same result....
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

November 27, 2016 - 03:07

The problem clearly stems from here:
https://github.com/tranquilit/WAPT/blob ... ge.py#L132

According to your message...

it seems to be a problem with `httpdatetime2isodate(httpdate)`.
The function converts a date string as returned in HTTP headers or mail headers to an isodate.

There might also be an issue retrieving the modification date from your Packages file.

I haven't been able to reproduce your problem myself.

Simon
avondra
Messages: 35
Registration: Nov 9, 2016 - 12:02

November 28, 2016 - 6:26 PM

Hello,
as advised, I generated the Packages file, which didn't exist, using the command:
python /opt/wapt/wapt-scanpackages.py /var/www/wapt-host.
Could this be the cause of the error?
Thank you for your help.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

November 28, 2016 - 6:55 PM

Which version of Wapt do you have?
avondra
Messages: 35
Registration: Nov 9, 2016 - 12:02

November 29, 2016 - 10:28

Version 1.3.8
Locked