Page 1 of 1

[SOLVED] Using wapt.install()

Published: June 29, 2022 - 11:52 PM
by AlbanUCA63
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

Re: Using wapt.install()

Published: June 30, 2022 - 3:15 PM
by dcardon
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

Re: Using wapt.install()

Published: June 30, 2022 - 4:18 PM
by AlbanUCA63
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

Re: Using wapt.install()

Published: July 1, 2022 - 10:12 AM
by AlbanUCA63
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

Re: Using wapt.install()

Published: July 1, 2022 - 11:18 AM
by dcardon
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

Re: Using wapt.install()

Published: July 1, 2022 - 3:43 PM
by AlbanUCA63
Okay, thanks for the info.
I'll try it out sometime. :)

Thanks!