Page 2 of 3

Re: Error creating WAPTAGENT

Published: November 21, 2016 - 5:39 PM
by avondra
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

Re: Error creating WAPTAGENT

Published: November 22, 2016 - 10:25 AM
by avondra
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

Re: Error creating WAPTAGENT

Published: November 22, 2016 - 2:47 PM
by htouvet
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.

Re: Error creating WAPTAGENT

Published: November 22, 2016 - 5:06 PM
by avondra
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.

Re: Error creating WAPTAGENT

Published: November 25, 2016 - 7:29 PM
by sfonteneau
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

Re: Error creating WAPTAGENT

Published: November 26, 2016 - 8:35 PM
by avondra
I reinstalled it in C:\wapt and I'm getting the same result....

Re: Error creating WAPTAGENT

Published: November 27, 2016 - 03:07
by sfonteneau
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

Re: Error creating WAPTAGENT

Published: November 28, 2016 - 6:26 PM
by avondra
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.

Re: Error creating WAPTAGENT

Published: November 28, 2016 - 6:55 PM
by sfonteneau
Which version of Wapt do you have?

Re: Error creating WAPTAGENT

Published: November 29, 2016 - 10:28 AM
by avondra
Version 1.3.8