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

qvm-convert-img: ValueError: No icon received #3344

Open
h01ger opened this Issue Nov 28, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@h01ger

h01ger commented Nov 28, 2017

Qubes OS version:

3.2

Affected TemplateVMs:

debian-8 (according to Unman, haven't tried myself)
debian-9 (according to Unman and myself)
fedora (according to Unman, haven't tried myself)

Steps to reproduce the behavior:

$ qvm-convert-img image.jpg image_clean.jpg
Traceback (most recent call last):
File "/usr/lib/qubes/qimg-convert-client", line 47, in
main()
File "/usr/lib/qubes/qimg-convert-client", line 41, in main
img = qubes.imgconverter.Image.get_through_dvm(args.src)
File "/usr/lib/python2.7/dist-packages/qubes/imgconverter.py", line 207, in get_through_dvm
return cls.get_from_stream(sys.stdin, **kwargs)
File "/usr/lib/python2.7/dist-packages/qubes/imgconverter.py", line 131, in get_from_stream
raise ValueError('No icon received')
ValueError: No icon received

@h01ger

This comment has been minimized.

Show comment
Hide comment
@h01ger

h01ger Dec 7, 2017

h01ger commented Dec 7, 2017

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Dec 11, 2017

Member

I believe this is broken because Stretch has v6.9 and versions of ImageMagick later than 6.8.9 have an "identify" which has problems with the file input. I suspect this is related to a changelog entry relating to reading from stdin no longer working.
In old versions identify -:filename worked.
In later versions it doesn't, and identify tries to find a file named -:filename

That is set in qubes.getImageRGBA here:

elif [ "${filename}" = "-" ] || [ "${filename##*:}" = "-" ]; then
    tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
    cat > "${tmpfile}"
    if [ "${filename##*:}" = "-" ]; then
        filename="${filename%:*}:${tmpfile}"
    else
        filename="${tmpfile}"
    fi

Simply using filename="${tmpfile}" restores functionality here, but possibly(probably?) breaks something else

It's not clear to me what that section is doing, or where else it might be used, so I'm reluctant to change it.
@marmarek ??

Member

unman commented Dec 11, 2017

I believe this is broken because Stretch has v6.9 and versions of ImageMagick later than 6.8.9 have an "identify" which has problems with the file input. I suspect this is related to a changelog entry relating to reading from stdin no longer working.
In old versions identify -:filename worked.
In later versions it doesn't, and identify tries to find a file named -:filename

That is set in qubes.getImageRGBA here:

elif [ "${filename}" = "-" ] || [ "${filename##*:}" = "-" ]; then
    tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
    cat > "${tmpfile}"
    if [ "${filename##*:}" = "-" ]; then
        filename="${filename%:*}:${tmpfile}"
    else
        filename="${tmpfile}"
    fi

Simply using filename="${tmpfile}" restores functionality here, but possibly(probably?) breaks something else

It's not clear to me what that section is doing, or where else it might be used, so I'm reluctant to change it.
@marmarek ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment