The createrepo operation fails with UnicodeDecodeError exception
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Traceback (most recent call last):
File "/usr/share/createrepo/genpkgmetadata.py", line 249, in <module>
main(sys.argv[1:])
File "/usr/share/createrepo/genpkgmetadata.py", line 223, in main
mdgen.doPkgMetadata()
File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 367, in doPkgMetadata
self.writeMetadataDocs(packages)
File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 531, in writeMetadataDocs
self.primaryfile.write(po.xml_dump_primary_metadata())
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1206, in xml_dump_primary_metadata
msg += misc.to_unicode(self._dump_base_items())
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1045, in _dump_base_items
msg += self._return_remote_location()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 20: ordinal not in range(128)
Does anyone know what this error is caused by? My character set is UTF-8, and the operation is apparently trying to process a character code > 127 as an ASCII character. Before I go digging into Python code, can anyone explain what is happening here? I didn't actually make any changes to the iso. I just copied everything as is, without actually adding any of my own rpms at this point, and tried to recreate the iso with the original data.
Well, the comps.xml is the primary input for the operation and my guess is that it is something in that file that the command is complaining about. That said, I tried taking off the -u option and the problem went away, and more importantly the custom iso I am creating appears to work okay.
The man page describes the -u option as:
Code:
-u --baseurl <url>
Optional base url location for all files. (not used by any clients at this time)
If there are no clients that make use of this option, it seemed reasonable to remove it.
Well, the comps.xml is the primary input for the operation and my guess is that it is something in that file that the command is complaining about. That said, I tried taking off the -u option and the problem went away, and more importantly the custom iso I am creating appears to work okay.
did you run the previous command in those steps, the one that creates the discinfo variable based upon the contents of the .discinfo file? anyway, i am able to replicate your error if I omit that step.
Yes, I am following all of the steps. Not sure why it's giving me a hard time, but it's working fine with the -u option removed, so I guess I'll leave it at that. I suspect it's "user error" somewhere on my part...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.