Dans le package vide qui se trouve à C:\waptdev auquel j'ai placé mon fichier scripts test.ps1 :
Sur le paquet vide, j'ai paramétré l'architecture en x64 et OS ciblés en Windows.
Code : Tout sélectionner
https://xxx.xxx.xxx.xxx/wapt/idvet-testscript_1.0.0-0_x64_windows_PROD.wapt : 5522 / 5522 (100%) (15 KB/s)
Erreur lors de l'installation de ['idvet-testscript(=1.0.0-0)']: erreurs dans les paquets [[PackageRequest(package='idvet-testscript',version=(Version('1.0.0.0'), 0),architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('idvet-testscript','1.0.0-0' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1237, in run_powershell\n return json.loads(\'\\n\'.join(lines))\n File "json\\__init__.py", line 357, in loads\n File "json\\decoder.py", line 337, in decode\n File "json\\decoder.py", line 355, in raw_decode\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\common.py", line 5348, in install\n result = self.install_wapt(p.localpath,\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4328, in install_wapt\n raise e\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4235, in install_wapt\n exitstatus = setup.install()\n File "C:\\Windows\\TEMP\\wapt8smn47lj\\setup.py", line 5, in install\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1266, in run_powershell_script\n return run_powershell(\'(invoke-expression -Command "%s")\' % script_filename, output_format, **kwargs)\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1239, in run_powershell\n raise ValueError(\'%s returned non json data:\\n%s\\n%s\' % (cmd, result, e))\nValueError: "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKACgAaQBuAHYAbwBrAGUALQBlAHgAcAByAGUAcwBzAGkAbwBuACAALQBDAG8AbQBtAGEAbgBkACAAIgB0AGUAcwB0AC4AcABzADEAIgApACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" returned non json data:\n#< CLIXML\r\n<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">test.ps1 : Le terme «test.ps1» n\'est pas reconnu comme nom d\'applet de commande, fonction, fichier de script ou _x000D__x000A_</S><S S="Error">programme exécutable. Vérifiez l\'orthographe du nom, ou si un chemin d\'accès existe, vérifiez que le chemin d\'accès _x000D__x000A_</S><S S="Error">est correct et réessayez._x000D__x000A_</S><S S="Error">Au caractère Ligne:1 : 1_x000D__x000A_</S><S S="Error">+ test.ps1_x000D__x000A_</S><S S="Error">+ ~~~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (test.ps1:String) [], CommandNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>\nExpecting value: line 1 column 1 (char 0)\n']]
Traceback (most recent call last):
File "<string>", line 1943, in run
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 737, in run
self._run()
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1341, in _run
raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['idvet-testscript(=1.0.0-0)']: erreurs dans les paquets [[PackageRequest(package='idvet-testscript',version=(Version('1.0.0.0'), 0),architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('idvet-testscript','1.0.0-0' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1237, in run_powershell\n return json.loads(\'\\n\'.join(lines))\n File "json\\__init__.py", line 357, in loads\n File "json\\decoder.py", line 337, in decode\n File "json\\decoder.py", line 355, in raw_decode\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\common.py", line 5348, in install\n result = self.install_wapt(p.localpath,\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4328, in install_wapt\n raise e\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4235, in install_wapt\n exitstatus = setup.install()\n File "C:\\Windows\\TEMP\\wapt8smn47lj\\setup.py", line 5, in install\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1266, in run_powershell_script\n return run_powershell(\'(invoke-expression -Command "%s")\' % script_filename, output_format, **kwargs)\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1239, in run_powershell\n raise ValueError(\'%s returned non json data:\\n%s\\n%s\' % (cmd, result, e))\nValueError: "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKACgAaQBuAHYAbwBrAGUALQBlAHgAcAByAGUAcwBzAGkAbwBuACAALQBDAG8AbQBtAGEAbgBkACAAIgB0AGUAcwB0AC4AcABzADEAIgApACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" returned non json data:\n#< CLIXML\r\n<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">test.ps1 : Le terme «test.ps1» n\'est pas reconnu comme nom d\'applet de commande, fonction, fichier de script ou _x000D__x000A_</S><S S="Error">programme exécutable. Vérifiez l\'orthographe du nom, ou si un chemin d\'accès existe, vérifiez que le chemin d\'accès _x000D__x000A_</S><S S="Error">est correct et réessayez._x000D__x000A_</S><S S="Error">Au caractère Ligne:1 : 1_x000D__x000A_</S><S S="Error">+ test.ps1_x000D__x000A_</S><S S="Error">+ ~~~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (test.ps1:String) [], CommandNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>\nExpecting value: line 1 column 1 (char 0)\n']]
Exception: Erreur lors de l'installation de ['idvet-testscript(=1.0.0-0)']: erreurs dans les paquets [[PackageRequest(package='idvet-testscript',version=(Version('1.0.0.0'), 0),architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('idvet-testscript','1.0.0-0' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1237, in run_powershell\n return json.loads(\'\\n\'.join(lines))\n File "json\\__init__.py", line 357, in loads\n File "json\\decoder.py", line 337, in decode\n File "json\\decoder.py", line 355, in raw_decode\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\common.py", line 5348, in install\n result = self.install_wapt(p.localpath,\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4328, in install_wapt\n raise e\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4235, in install_wapt\n exitstatus = setup.install()\n File "C:\\Windows\\TEMP\\wapt8smn47lj\\setup.py", line 5, in install\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1266, in run_powershell_script\n return run_powershell(\'(invoke-expression -Command "%s")\' % script_filename, output_format, **kwargs)\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1239, in run_powershell\n raise ValueError(\'%s returned non json data:\\n%s\\n%s\' % (cmd, result, e))\nValueError: "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKACgAaQBuAHYAbwBrAGUALQBlAHgAcAByAGUAcwBzAGkAbwBuACAALQBDAG8AbQBtAGEAbgBkACAAIgB0AGUAcwB0AC4AcABzADEAIgApACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" returned non json data:\n#< CLIXML\r\n<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">test.ps1 : Le terme «test.ps1» n\'est pas reconnu comme nom d\'applet de commande, fonction, fichier de script ou _x000D__x000A_</S><S S="Error">programme exécutable. Vérifiez l\'orthographe du nom, ou si un chemin d\'accès existe, vérifiez que le chemin d\'accès _x000D__x000A_</S><S S="Error">est correct et réessayez._x000D__x000A_</S><S S="Error">Au caractère Ligne:1 : 1_x000D__x000A_</S><S S="Error">+ test.ps1_x000D__x000A_</S><S S="Error">+ ~~~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (test.ps1:String) [], CommandNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>\nExpecting value: line 1 column 1 (char 0)\n']]
Traceback (most recent call last):
File "<string>", line 1943, in run
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 737, in run
self._run()
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1341, in _run
raise Exception(_('Error during install of {}: errors in packages {}').format(
Exception: Erreur lors de l'installation de ['idvet-testscript(=1.0.0-0)']: erreurs dans les paquets [[PackageRequest(package='idvet-testscript',version=(Version('1.0.0.0'), 0),architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'],min_os_version=Version('10.0.19045'),max_os_version=Version('10.0.19045')), PackageEntry('idvet-testscript','1.0.0-0' architecture='x64',maturity='PROD',target_os='windows'), 'Traceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1237, in run_powershell\n return json.loads(\'\\n\'.join(lines))\n File "json\\__init__.py", line 357, in loads\n File "json\\decoder.py", line 337, in decode\n File "json\\decoder.py", line 355, in raw_decode\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\common.py", line 5348, in install\n result = self.install_wapt(p.localpath,\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4328, in install_wapt\n raise e\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4235, in install_wapt\n exitstatus = setup.install()\n File "C:\\Windows\\TEMP\\wapt8smn47lj\\setup.py", line 5, in install\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1266, in run_powershell_script\n return run_powershell(\'(invoke-expression -Command "%s")\' % script_filename, output_format, **kwargs)\n File "C:\\Program Files (x86)\\wapt\\setuphelpers_windows.py", line 1239, in run_powershell\n raise ValueError(\'%s returned non json data:\\n%s\\n%s\' % (cmd, result, e))\nValueError: "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKACgAaQBuAHYAbwBrAGUALQBlAHgAcAByAGUAcwBzAGkAbwBuACAALQBDAG8AbQBtAGEAbgBkACAAIgB0AGUAcwB0AC4AcABzADEAIgApACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" returned non json data:\n#< CLIXML\r\n<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">test.ps1 : Le terme «test.ps1» n\'est pas reconnu comme nom d\'applet de commande, fonction, fichier de script ou _x000D__x000A_</S><S S="Error">programme exécutable. Vérifiez l\'orthographe du nom, ou si un chemin d\'accès existe, vérifiez que le chemin d\'accès _x000D__x000A_</S><S S="Error">est correct et réessayez._x000D__x000A_</S><S S="Error">Au caractère Ligne:1 : 1_x000D__x000A_</S><S S="Error">+ test.ps1_x000D__x000A_</S><S S="Error">+ ~~~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (test.ps1:String) [], CommandNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>\nExpecting value: line 1 column 1 (char 0)\n']]
À savoir que j'ai bien testé de lancer manuellement le script sur le PC host et il fonctionne correctement.
J'ai testé également avec l'argument run_powershell_script(r"test.ps1", output_format='text') sans savoir à quoi ça sert vraiment, le paquet est lancé sans problème mais le script ne fonctionne pas sur le host.