devstructure / blueprint

Reverse engineer server configuration
http://devstructure.com/
Other
2.15k stars 132 forks source link

TypeError: decoding Unicode is not supported #86

Closed mojodna closed 13 years ago

mojodna commented 13 years ago

After installing Graphite per these instructions (using Ubuntu packages where possible, except for the 3 Graphite tarballs), adding !:source:/opt to .blueprintignore (because Graphite insists on installing things there) and running sudo blueprint create graphite, I get the following error:

# [blueprint] parsing ~/.blueprintignore
# [blueprint] searching for software built from source
# [blueprint] searching for Ruby gems
# [blueprint] searching for PEAR/PECL packages
# [blueprint] searching for APT packages
# [blueprint] searching for Yum packages
# [blueprint] searching for configuration files
# [blueprint] searching for Python packages
# [blueprint] searching for npm packages
# [blueprint] searching for service dependencies
Traceback (most recent call last):
  File "/usr/local/bin/blueprint-create", line 61, in <module>
    b = blueprint.Blueprint(name=name, create=True)
  File "/usr/local/lib/python2.7/dist-packages/blueprint/__init__.py", line 95, in __init__
    services.services(self)
  File "/usr/local/lib/python2.7/dist-packages/blueprint/services.py", line 86, in services
    b.walk_services(service=service)
  File "/usr/local/lib/python2.7/dist-packages/blueprint/__init__.py", line 542, in walk_services
    self.walk_services(managername, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/blueprint/__init__.py", line 552, in walk_services
    callable(manager, service)
  File "/usr/local/lib/python2.7/dist-packages/blueprint/services.py", line 79, in service
    service_file(manager, service, '/etc/init.d/{0}'.format(service))
  File "/usr/local/lib/python2.7/dist-packages/blueprint/services.py", line 45, in service_file
    content = unicode(content, encoding)
TypeError: decoding Unicode is not supported

Removing !:source:/opt makes the error go away. Let me know if there's more I can do to help you debug.

rcrowley commented 13 years ago

Hey Seth, could I trouble you to give the issue-86 branch a test? I have tested this artificially but want to verify it works as expected in the wild.

mojodna commented 13 years ago

Sweet, it works now.