UnicodeDecodeError when syncing specific image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
uvtool |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When trying to sync a specific image, a unicode error show up.
Not sure if my usage is correct.
# uvt-simplestrea
Traceback (most recent call last):
File "/usr/bin/
uvtool.
File "/usr/lib/
args.func(args)
File "/usr/lib/
tmirror.
File "/usr/lib/
content, payload = reader.
File "/usr/lib/
raw = source.
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfb in position 3: invalid start byte
Hi,
--path is expected to point to JSON, not the raw image URL.
The point of uvt-simplestrea ms-libvirt is to sync against a simplestreams source, so it doesn't make sense to give it a raw image URL directly. If you want to do that, you can just use wget and the --backing- image-file option to "uvt-kvm create" for example.
If you want to pull a specific image or set of images with uvt-simplestrea ms-libvirt then you're supposed to specify the metadata criteria precisely. You can use sstream-query to test. For example:
sstream-query http:// cloud-images. ubuntu. com/releases release=focal arch=amd64 version_ name=20231011 ftype=disk1.img
This provides a single image, so this should work:
uvt-simplestrea ms-libvirt sync --source http:// cloud-images. ubuntu. com/releases release=focal arch=amd64 version_ name=20231011 ftype=disk1.img
Hope that helps!