akalongman / sublimetext-stringutilities

Sublime Text 2/3 plugin for string manipulations
MIT License
83 stars 24 forks source link

global name 'unichr' is not defined #6

Closed yuanfeiz closed 8 years ago

yuanfeiz commented 9 years ago

Hi, I got the following error when trying to convert a string into its unicode representation, any idea?

Thanks!

NameError: global name 'unichr' is not defined
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "/Users/yuanfei/Library/Application Support/Sublime Text 3/Packages/StringUtilities/stringutilities.py", line 110, in run
    text = re.sub(pattern, lambda m: unichr(int(m.group(2), 16)), self.view.substr(region))
  File "./re.py", line 170, in sub
  File "/Users/yuanfei/Library/Application Support/Sublime Text 3/Packages/StringUtilities/stringutilities.py", line 110, in <lambda>
    text = re.sub(pattern, lambda m: unichr(int(m.group(2), 16)), self.view.substr(region))
chence commented 9 years ago

+1 same error

Vasfed commented 8 years ago

unichr was removed from python3 because regular chr now does the same Created a PR #9