podman-py icon indicating copy to clipboard operation
podman-py copied to clipboard

client.images.prune() raises

Open danmilon opened this issue 2 years ago • 0 comments

Hey! Thanks for the great software!

When doing an images prune(), it gives me:

python -c 'import podman; client = podman.PodmanClient(base_url="unix:///run/podman/podman.sock"); client.images.prune();'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/<redacted>/lib/python3.7/site-packages/podman/domain/images_manager.py", line 151, in prune
    for element in response.json():
TypeError: 'NoneType' object is not iterable

Upon investigation, I see that response.text is null\n and status code is 200.

I'm using podman-py version 4.5.0 and podman version is:

$ podman version
Version:      3.4.2
API Version:  3.4.2
Go Version:   go1.15.9
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

When doing podman image prune it works fine.

danmilon avatar May 31 '23 15:05 danmilon