[SOLVED] Using wapt.install()

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
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
AlbanUCA63
Messages: 15
Registration: March 18, 2019 - 10:14

June 29, 2022 - 11:52 PM

Hello everyone

I have a problem when I use the WAPT.install('package') function.
I encountered an error during its execution:

Code: Select all

2022-06-29 23:37:48,592 CRITICAL Error downloading package from http repository, please update... error : 'NoneType' object has no attribute 'split'
2022-06-29 23:37:48,595 CRITICAL Error downloading some files : [(u'https://monserveur/wapt/monpaquet.wapt', "'NoneType' object has no attribute 'split'")]
2022-06-29 23:37:48,598 CRITICAL Packagexxxxxx [x64_fr_PROD] not installed due to errors : TypeError: coercing to Unicode: need string or buffer, NoneType found
No matter which package I put as a parameter... same result.

I also have to use the WAPT.remove('package') function which doesn't cause any problems (of course, we're not downloading anything :) ).

The goal is to call the package in question rather than running the install and uninstall commands in the package being created.

One further question: how would you pass a "wapt-get install my_package" command within a script? It doesn't work via run(r'')

If you need any further information, please don't hesitate to ask.
We're using Wapt 2.2 Enterprise.

Thank you all,

Alban
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

June 30, 2022 - 3:15 PM

What is the exact code of the thing that isn't working (i.e., the complete code of the setup.py file that shows the problem)?

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
AlbanUCA63
Messages: 15
Registration: March 18, 2019 - 10:14

June 30, 2022 - 4:18 PM

Hi Denis,

This only happens when I use WAPT.install('mypackage').

After several tests, I see that it works once the package is built.
I only get the error mentioned when using PyScripter.

I'd say we're halfway there; the result seems to be working. I'll continue my tests.

Alban
AlbanUCA63
Messages: 15
Registration: March 18, 2019 - 10:14

July 1, 2022 - 10:12

Hello everyone,

I can confirm that everything works once the package is built.
Perhaps there was an issue on my development machine...

Good luck to all,

Alban
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 1, 2022 - 11:18

Hi Alban,

it should work in PyScripter. You can try installing PyScripter 3 on a clean machine to see if you can reproduce the problem.
That said, be careful when using WAPT.install(xxxx) because the WAPT agent doesn't know to pre-download it to the cache, and if the installation happens while the machine is shut down and there's no network connection at that moment, it will crash.

See you soon,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
AlbanUCA63
Messages: 15
Registration: March 18, 2019 - 10:14

July 1, 2022 - 3:43 PM

Okay, thanks for the info.
I'll try it out sometime. :)

Thanks!
Locked