homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
301 stars 28 forks source link

Recipe Robot doesn't parse unicode characters in descriptions #64

Closed homebysix closed 8 years ago

homebysix commented 8 years ago

For example, this AutoCasperNBI run failed because there's a single curly quote in the repo's description.

Processing https://github.com/macmule/AutoCasperNBI ...
Input path looks like a GitHub URL.
Getting GitHub repo...
    GitHub repo is: macmule/AutoCasperNBI
Getting app name...
    App name is: AutoCasperNBI
Getting GitHub description...
    GitHub description is: AutoCasperNBI is an app that automates the creation of NetBoot Images (read: NBI’s) for use with Casper Imaging.
[ERROR] Recipe Robot exploded with unexpected error: 
Traceback (most recent call last):
  File "/Users/elliot/Developer/My Repos/recipe-robot/scripts/recipe-robot", line 103, in main
    process_input_path(facts)
  File "/Users/elliot/Developer/My Repos/recipe-robot/scripts/recipe_robot_lib/inspect.py", line 127, in process_input_path
    facts = inspect_func(input_path, args, facts)
  File "/Users/elliot/Developer/My Repos/recipe-robot/scripts/recipe_robot_lib/inspect.py", line 998, in inspect_github_url
    facts["description"] = description
  File "/Users/elliot/Developer/My Repos/recipe-robot/scripts/recipe_robot_lib/facts.py", line 79, in __setitem__
    val = NotifyingString(self.default_suffix, val)
  File "/Users/elliot/Developer/My Repos/recipe-robot/scripts/recipe_robot_lib/facts.py", line 141, in __new__
    instance = super(NotifyingString, cls).__new__(cls, text)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 80: ordinal not in range(128)