Closed maystery closed 1 year ago
I found the cause of the issue. If you run it in venv you need to run it with Python prefix instead of direct execution.
Closing the issue.
So python3 ./gx-sd-generator.py
works while ./gx-sd-generator.py
does not?
That's right, in venv the interpreter differs from the file defined in the first line. Also, I think my base interpreter is contaminated with system-wide installations that's why the result is inconsistent in my case. (ups)
I'm using a shebang (#!
) with #! /usr/bin/python3
rather than the more common #! /usr/bin/env python3
in the script, though I've seen both in the wild with reasoning for either side. If avoiding the env breaks venv, we should rather go back to using env. Interested in quickly checking this?
#!/usr/bin/env python3
works fine. I sent a PR #41 with this small modification.
Fixed by merged PR #41.
Here I paste the two command output:
openstack-discovery.py:
gx-sd-generator.py: