Upload package with spaces

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
Floflobel
Messages: 135
Registration: Oct 15, 2015 - 5:32 p.m.

April 19, 2018 - 11:58

Good morning,

When uploading a package containing spaces, I encountered an error:

Code: Select all

HTTPError: 500 Server Error:  for url: https://wapt-dev.domain.
com/api/v3/upload_packages
I discovered through several tests that the problem stemmed from a space in my package name. Would it be possible to modify the error message to be more explicit?

Here is the upload log in debug mode:

Code: Select all

2018-04-19 11:27:16,134 INFO Configuration file : C:\Users\user\AppData\Local
\waptconsole\waptconsole.ini
2018-04-19 11:27:16,134 INFO   waptserver     : <WaptServer https://wapt-dev.
domain.com>
2018-04-19 11:27:16,134 INFO   repositories   : [<WaptRepo https://wapt-dev.c
osium.com/wapt for domain >]
2018-04-19 11:27:16,135 INFO   packages count : 617
2018-04-19 11:27:16,135 DEBUG WAPT base directory : C:\Program Files (x86)\wapt
2018-04-19 11:27:16,135 DEBUG Package cache dir : C:\Users\user\AppData\Local
\waptconsole\cache
2018-04-19 11:27:16,135 DEBUG WAPT DB Structure version;: 20180303
Uploading packages to https://wapt-dev.domain.com
Please get login for https://wapt-dev.domain.com/api/v3/upload_xxx:admin 
Password:
D:\git\wapt\software\SSH Daemon_7.6.1.1-5_all.wapt[
2018-04-19 11:27:23,467 DEBUG Starting new HTTPS connection (1): wapt-dev.cos
ium.com
D:\git\wapt\software\SSH Daemon_7.6.1.1-5_all.wapt[=============================
D:\git\wapt\software\SSH Daemon_7.6.1.1-5_all.wapt[=============================
===] 4470/4470 - 00:00:00
FATAL ERROR : HTTPError: 500 Server Error:  for url: https://wapt-dev.domain.
com/api/v3/upload_packages
Traceback (most recent call last):
  File "<string>", line 1215, in <module>
  File "<string>", line 959, in main
  File "C:\Program Files (x86)\wapt\common.py", line 2947, in upload_package
    return self.http_upload_package(filenames,wapt_server_user=wapt_server_user,
wapt_server_passwd=wapt_server_passwd)
  File "C:\Program Files (x86)\wapt\common.py", line 2920, in http_upload_packag
e
    res_partiel = self.waptserver.post('api/v3/upload_packages',data=f.get(),aut
h=auth,timeout=300)
  File "C:\Program Files (x86)\wapt\common.py", line 1606, in post
    req.raise_for_status()
  File "C:\Program Files (x86)\wapt\lib\site-packages\requests\models.py", line
935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error:  for url: https://wapt-dev.c
osium.com/api/v3/upload_packages
Exception at 0043E08A: EPyIOError:
HTTPError: 500 Server Error:  for url: https://wapt-dev.domain.com/api/v3/upl
oad_packages.
Sincerely,
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 19, 2018 - 10:54 PM

As stated in the documentation:

https://www.wapt.fr/fr/doc/CreationPaqu ... ml#package

Code: Select all

Nom du paquet WAPT, sans accent, sans espace, sans caractère spécial, sans majuscule.
Locked