-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: failed to parse requirements from paloaltonetworks.panos, error: not enough values to unpack (expected 1, got 0) #447
Comments
🎉 Thanks for opening your first issue here! Welcome to the community! |
I'm seeing the same thing. Here is a little more info. I think its the introspect.py that is failing. I almost wonder if introspect.py can't parse requirements.txt because of the hashes in it. --> ec10a2c35f7
[3/4] STEP 12/13: RUN $PYCMD /output/scripts/introspect.py introspect --sanitize --user-pip=requirements.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt
Warning: failed to parse requirements from paloaltonetworks.panos, error: not enough values to unpack (expected 1, got 0)
Creating parent directory for /tmp/src/requirements.txt
---
python:
- 'pan_os_python==1.8.0 # from collection user'
- 'pan_python==0.17.0 # from collection user'
- 'xmltodict==0.12.0 # from collection user'
system: [] Note, I did a raw installed on debian with python3.9 and pip3 and did a pip3 install -r requirement.txt and it completed without issue or complaint. As a work around I added the modules to a requirement.txt for ansible-builder (which is the build output listed above to be clear) and it seems to build via ansible-builder. [klauskinski@supertower Anisble-Builder]$ egrep panos output.txt
Downloading https://galaxy.ansible.com/download/paloaltonetworks-panos-2.17.3.tar.gz to /home/runner/.ansible/tmp/ansible-local-1zqt9r2_v/tmph36d9i61/paloaltonetworks-panos-2.17.3-eginftxn
Installing 'paloaltonetworks.panos:2.17.3' to '/usr/share/ansible/collections/ansible_collections/paloaltonetworks/panos'
paloaltonetworks.panos:2.17.3 was installed successfully
Warning: failed to parse requirements from paloaltonetworks.panos, error: not enough values to unpack (expected 1, got 0)
[klauskinski@supertower Anisble-Builder]$ FYI I've just started using ansible-builder so I don't know for sure yet if this works, so grain of salt and all. |
Here is my requirements.txt and relevant execution-environment.yml section if it helps. [klauskinski@supertower Anisble-Builder]$ cat requirements.txt
pan-os-python==1.8.0
pan-python==0.17.0
xmltodict==0.12.0
[klauskinski@supertower Anisble-Builder]$ cat execution-environment.yml
---
version: 3
dependencies:
galaxy: requirements.yml
python: requirements.txt |
ok so long story short. the requirements.txt parser found in Ansible-builder doesn't support breaking up long lines with "\" in addition it doesn't support --hash lines. I opened issue #593 with Ansible-builder about this. It was closed today and marked as a duplicate of issue #319. I don't think there is any reason to change requirements.txt in pan-os-ansible and the work around I listed above is working in our lab. Not sure if you want to keep this open but it seems like there is no action to take on this side of the fence and anyone wanting to see whats going on with ansible-builder can follow the threads listed above. |
Describe the bug
Using
ansible-builder
to include the latest version of this collection into an Execution Environment, I am seeing the following error to pull and use the requirements.txt from this collection:Warning: failed to parse requirements from paloaltonetworks.panos, error: not enough values to unpack (expected 1, got 0)
That results in the python deps not being included in the build and I have to explicitly define them to ansible-builder adds it.
I'm using ansible-builder v1.2.0, ansible-core 2.14, and using podman v4.2.0 to build container.
Expected behavior
ansible-builder uses the
requirements.txt
from this repo to install the proper depsCurrent behavior
ansible-builder fails with:
The text was updated successfully, but these errors were encountered: