[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pulp-list] import failed due to invalid UTF-8 in rpm header



Hello,

migrating old RHEL3 and RHEL repositories failed with stacktraces like this:

Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/admin/plugins/content.py", line 136, in run
    uploaded = uapi.import_content(metadata, upload_id)
  File "/usr/lib/python2.6/site-packages/pulp/client/api/upload.py", line 183, in import_content
    return self.server.POST(path, uploadinfo)[1]
  File "/usr/lib/python2.6/site-packages/pulp/client/api/server.py", line 323, in POST
    return self._request('POST', path, body=body)
  File "/usr/lib/python2.6/site-packages/pulp/client/api/server.py", line 261, in _request
    body = json.dumps(body)
  File "/usr/lib64/python2.6/json/__init__.py", line 230, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode
    chunks = list(self.iterencode(o))
  File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
    for chunk in self._iterencode_dict(o, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
    for chunk in self._iterencode(value, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
    for chunk in self._iterencode_dict(o, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
    for chunk in self._iterencode(value, markers):
  File "/usr/lib64/python2.6/json/encoder.py", line 294, in _iterencode
    yield encoder(o)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 10: invalid start byte

Issue is caused by invalid characters in 'License'. Patch pulp-metadata-convert.patch against 1.1.15
solved the problem for me.

regards,
-ap


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]