# Fetching collections from private Artifactory: KeyError: 'results'

**URL:** <https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674>\
**Category:** Get Help\
**Tags:** awx, ee, galaxy-ng\
**Created:** [October 14, 2025, 6:41am UTC](https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674 "2025-10-14T06:41:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kastl-ars](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kastl-ars/32/2315_2.png) [@kastl-ars](https://forum.ansible.com/u/kastl-ars)\
**Post date:** [October 14, 2025, 6:41am UTC](https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674/1 "2025-10-14T06:41:40Z")

</div>

Dear all,

I am currently trying to get a AWX instance to update the collections not from the public ansible galaxy, but from an Artifactory instance in our environment.

I can pull the collections from Artifactory locally, so it works in general.

We are building our own execution environment image, which is also pulling the collections from Artifactory successfully.

```auto
  prepend_galaxy:
    - ENV ANSIBLE_GALAXY_SERVER_LIST=ext_ansible_galaxy_remote
    - ENV ANSIBLE_GALAXY_SERVER_EXT_ANSIBLE_GALAXY_REMOTE_URL=https://artifactory.example.org/...

```

However, when trying to get the collection update (during a project update in AWX) to update from Artifactory, we get the following error:

```auto
[WARNING]: Skipping Galaxy server
https://artifactory.example.org/
Got an unexpected error when getting available versions of collection
community.hashi_vault: 'results'
ERROR! Unexpected Exception, this is probably a bug: 'results'

```

To use Artifactory, we have created a AWX credential of type “Ansible Galaxy” with the URL of Artifactory set.  
We had to disable the TLS certificate validation for collection updates (I’ll open a separate post for that).

The actual python error looks like this:

```auto
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/ansible/galaxy/api.py", line 93, in wrapped
    data = self._call_galaxy(n_url, method='GET', error_context_msg=error_context_msg, cache=True)
  File "/usr/local/lib/python3.13/site-packages/ansible/module_utils/api.py", line 169, in run_function
    return call_retryable_function()
  File "/usr/local/lib/python3.13/site-packages/ansible/galaxy/api.py", line 389, in _call_galaxy
    res = path_cache['results']
          ~~~~~~~~~~ ^^^^^^^^^^^
KeyError: 'results'

```

The collections can be fetched locally without authentication to Artifactory, but we have also tried to add a token to the Galaxy-type credential. No change in the error.

The execution environment image used for the controlplane is self-built to have a recent Ansible included (2.18.10).

Any ideas, anyone?

Kind Regards,  
Johannes

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [October 22, 2025, 9:09pm UTC](https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674/2 "2025-10-22T21:09:36Z")

</div>

This was also reported as a bug [Unexpected Exception, this is probably a bug: 'results' · Issue #85918 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/85918). The error handling should be a little better now on devel, and give clues as to what is actually in the cache. You can work around the issue with `--no-cache`.

---

<div class="post-metadata">

**Author:** ![kastl-ars](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kastl-ars/32/2315_2.png) [@kastl-ars](https://forum.ansible.com/u/kastl-ars)\
**Post date:** [October 23, 2025, 5:25am UTC](https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674/3 "2025-10-23T05:25:37Z")

</div>

Thanks for the reply and the bug report. How would I use `--no-cache` in AWX during the collections update?

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [November 3, 2025, 10:24am UTC](https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674/4 "2025-11-03T10:24:59Z")

</div>

You can add ansible-galaxy CLI args in the [execution environment](https://ansible.readthedocs.io/projects/builder/en/latest/definition/#build-arg-defaults):

```yaml
build_arg_defaults:
  ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: '--no-cache'

```

---

<div class="post-metadata">

**Author:** ![kastl-ars](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kastl-ars/32/2315_2.png) [@kastl-ars](https://forum.ansible.com/u/kastl-ars)\
**Post date:** [November 12, 2025, 8:54am UTC](https://forum.ansible.com/t/fetching-collections-from-private-artifactory-keyerror-results/44674/5 "2025-11-12T08:54:22Z")

</div>

Thanks, I’ll try that.

Edit: But those look like they are just for building the execution environment. Are they also used when using the EE while updating collections in AWX?
