# awx cli : error when create user and team

**URL:** <https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [August 8, 2022, 1:36pm UTC](https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962 "2022-08-08T13:36:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Awx](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@John\_Awx](https://forum.ansible.com/u/John_Awx)\
**Post date:** [August 8, 2022, 1:36pm UTC](https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962/1 "2022-08-08T13:36:32Z")

</div>

Hi everyone,

I need to create an user and a team with the awx cli.

exemple :

# awx users create test

I’ve got this error :

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): AWXURL  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “GET /api/ HTTP/1.1” 200 198  
DEBUG:awxkit.api.client:“GET [https://AWXURL/api/](https://AWXURL/api/)” elapsed: 0:00:00.059704  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.api.ApiV2’\> by url: /api/v2/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “GET /api/v2/ HTTP/1.1” 200 1708  
DEBUG:awxkit.api.client:“GET [https://AWXURL/api/v2/](https://AWXURL/api/v2/)” elapsed: 0:00:00.041160  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.users.Users’\> by url: /api/v2/users/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “OPTIONS /api/v2/users/ HTTP/1.1” 200 10005  
DEBUG:awxkit.api.client:“OPTIONS [https://AWXURL/api/v2/users/](https://AWXURL/api/v2/users/)” elapsed: 0:00:00.070306  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.users.Users’\> by url: /api/v2/users/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “OPTIONS /api/v2/users/1/ HTTP/1.1” 200 3897  
DEBUG:awxkit.api.client:“OPTIONS [https://AWXURL/api/v2/users/1/](https://AWXURL/api/v2/users/1/)” elapsed: 0:00:00.066209  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.organizations.Organizations’\> by url: /api/v2/organizations/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “OPTIONS /api/v2/organizations/ HTTP/1.1” 200 10075  
DEBUG:awxkit.api.client:“OPTIONS [https://AWXURL/api/v2/organizations/](https://AWXURL/api/v2/organizations/)” elapsed: 0:00:00.142011  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.organizations.Organizations’\> by url: /api/v2/organizations/  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.projects.Projects’\> by url: /api/v2/projects/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “OPTIONS /api/v2/projects/ HTTP/1.1” 200 18626  
DEBUG:awxkit.api.client:“OPTIONS [https://AWXURL/api/v2/projects/](https://AWXURL/api/v2/projects/)” elapsed: 0:00:00.077585  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.projects.Projects’\> by url: /api/v2/projects/  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.inventory.Inventories’\> by url: /api/v2/inventories/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “OPTIONS /api/v2/inventories/ HTTP/1.1” 200 13332  
DEBUG:awxkit.api.client:“OPTIONS [https://AWXURL/api/v2/inventories/](https://AWXURL/api/v2/inventories/)” elapsed: 0:00:00.065026  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.inventory.Inventories’\> by url: /api/v2/inventories/  
DEBUG:awxkit.api.registry:Retrieved \<class ‘awxkit.api.pages.inventory.InventoryScripts’\> by url: /api/v2/inventory\_scripts/  
DEBUG:urllib3.connectionpool:[https://AWXURL](https://AWXURL) “OPTIONS /api/v2/inventory\_scripts/ HTTP/1.1” 404 55  
DEBUG:awxkit.api.client:“OPTIONS [https://AWXURL/api/v2/inventory\_scripts/](https://AWXURL/api/v2/inventory_scripts/)” elapsed: 0:00:00.034487  
Traceback (most recent call last):  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/cli/ **init**.py”, line 25, in run  
cli.parse\_resource()  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/cli/client.py”, line 168, in parse\_resource  
response = self.parse\_action(resource)  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/cli/client.py”, line 229, in parse\_action  
parser = ResourceOptionsParser(self.v2, page, self.resource, subparsers)  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/cli/options.py”, line 103, in **init**  
self.handle\_custom\_actions()  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/cli/options.py”, line 286, in handle\_custom\_actions  
action(self.page).add\_arguments(self.parser, self)  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/cli/custom.py”, line 412, in add\_arguments  
options = self.page. **class** (  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/api/pages/page.py”, line 511, in options  
return self.\_create().options()  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/api/pages/page.py”, line 296, in options  
return self.page\_identity(r)  
File “/home/jonathan/.local/lib/python3.8/site-packages/awxkit/api/pages/page.py”, line 211, in page\_identity  
raise exception(exc\_str, data)  
awxkit.exceptions.NotFound: Not Found (404) received - {‘detail’: ‘The requested resource could not be found.’}  
\<\_io.TextIOWrapper name=‘’ mode=‘w’ encoding=‘utf-8’\>  
{“detail”: “The requested resource could not be found.”}

I’ve got an 404 with “inventory\_scripts”.

I’ve missed something ?

Thanks

awx version : 21.4.0  
awx cli version : 3.8.6

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [August 8, 2022, 1:40pm UTC](https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962/2 "2022-08-08T13:40:22Z")

</div>

What version of awx cli are you using and what version of AWX are you targeting?  
You can do a `pip show awxkit` to find the version of awxkit and click on the `?` in the top right of the AWX UI \> about to get the AWX version.  
This looks like maybe you are using an older version of the cli pointed to a newer version of AWX and the old cli is trying to use an endpoint that no longer exists.  
If this is the case, try doing a `pip install --upgrade awxkit` to get a newer version of the cli.

Let us know if that helps.

-The AWX Team

---

<div class="post-metadata">

**Author:** ![John\_Awx](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@John\_Awx](https://forum.ansible.com/u/John_Awx)\
**Post date:** [August 8, 2022, 2:08pm UTC](https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962/3 "2022-08-08T14:08:32Z")

</div>

Hi,

awx version : 21.4.0  
awx cli version : 3.8.6

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [August 8, 2022, 2:11pm UTC](https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962/4 "2022-08-08T14:11:39Z")

</div>

That cli version if actually an older Tower version (which would be trying to get that inventory\_scripts endpoint which no longer exists).  
Try updating the CLI version with the `pip upgrade --install awxkit`.  
That should give you the latest to correspond to your latest version of AWX.

-The AWX Team

---

<div class="post-metadata">

**Author:** ![John\_Awx](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@John\_Awx](https://forum.ansible.com/u/John_Awx)\
**Post date:** [August 8, 2022, 2:21pm UTC](https://forum.ansible.com/t/awx-cli-error-when-create-user-and-team/36962/5 "2022-08-08T14:21:41Z")

</div>

Thx a lot !  
I’ve definitely missed something …
