AttributeError: 'ResolvConf' object has no attribute 'encode'

Bug #1479988 reported by Joshua Harlow on 2015-07-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Joshua Harlow

Bug Description

Seeing the following on a rhel6 rpm build of cloud-init:

Probably due to encoding tweaks recently done,

2015-07-30 21:17:28,151 -[DEBUG]: Getting data from <class 'cloudinit.sources.DataSourceConfigDrive.DataSourceConfigDrive'> failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/sources/", line 255, in find_source
if s.get_data():
File "/usr/lib/python2.6/site-packages/cloudinit/sources/", line 120, in get_data
on_first_boot(results, distro=self.distro)
File "/usr/lib/python2.6/site-packages/cloudinit/sources/", line 215, in on_first_boot
File "/usr/lib/python2.6/site-packages/cloudinit/distros/", line 122, in apply_network
dev_names = self._write_network(settings)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/", line 102, in _write_network
nameservers, searchservers)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/", line 84, in update_resolve_conf_file
util.write_file(fn, r_conf, 0o644)
File "/usr/lib/python2.6/site-packages/cloudinit/", line 1625, in write_file
content = encode_text(content)
File "/usr/lib/python2.6/site-packages/cloudinit/", line 93, in encode_text
return text.encode(encoding)
AttributeError: 'ResolvConf' object has no attribute 'encode'

Related branches

Joshua Harlow (harlowja) on 2015-07-30
Changed in cloud-init:
assignee: nobody → Joshua Harlow (harlowja)
Scott Moser (smoser) wrote :

is this still valid? please try the copr repo ( and report back, then set Status to Confirmed if still a problem.

Changed in cloud-init:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers