xamado / sublime-templateninja

Create new files quickly with Templates - Sublime Text 2 Plugin
8 stars 2 forks source link

Failed to parse (during creating new file) #2

Open bluszcz opened 11 years ago

bluszcz commented 11 years ago

When I try to create new file using Ninja, I am getting following:

Failed to parse: /home/bluszcz/.config/sublime-text-  2/Packages/TemplateNinja/templates/sublimetemplate.sublime-template
Failed to parse: /home/bluszcz/.config/sublime-text-    2/Packages/TemplateNinja/templates/PHPClass.sublime-template
Failed to parse: /home/bluszcz/.config/sublime-text-2/Packages/TemplateNinja/templates/CSharp.sublime-template
Failed to parse: /home/bluszcz/.config/sublime-text-2/Packages/TemplateNinja/templates/PHPEmpty.sublime-template
Failed to parse: /home/bluszcz/.config/sublime-text-2/Packages/TemplateNinja/templates/CSharpClass.sublime-template
Failed to parse: /home/bluszcz/.config/sublime-text-2/Packages/TemplateNinja/templates/CPPHeader.sublime-template
Failed to parse: /home/bluszcz/.config/sublime-text-2/Packages/TemplateNinja/templates/CPPClass.sublime-template

Failed to parse: /home/bluszcz/.config/sublime-text-2/Packages/TemplateNinja/templates/HTML5.sublime-template

bluszcz commented 11 years ago

Ok, I found it - its problem related with import. Will try to fix and PR.

Traceback (most recent call last):
  File "./TemplateNinja.py", line 80, in on_file_name_entered
    self.show_template_selection(filename)
  File "./TemplateNinja.py", line 90, in show_template_selection
    templates = self.find_templates_for_scope(fileext)
  File "./TemplateNinja.py", line 161, in find_templates_for_scope
    template = ElementTree.parse(open(f))
  File ".\xml\etree\ElementTree.py", line 862, in parse
  File ".\xml\etree\ElementTree.py", line 581, in parse
  File ".\xml\etree\ElementTree.py", line 1118, in __init__
ImportError: No module named expat; use SimpleXMLTreeBuilder instead
Traceback (most recent call last):
  File "./TemplateNinja.py", line 80, in on_file_name_entered
    self.show_template_selection(filename)
  File "./TemplateNinja.py", line 90, in show_template_selection
    templates = self.find_templates_for_scope(fileext)
  File "./TemplateNinja.py", line 161, in find_templates_for_scope
    template = ElementTree.parse(open(f))
  File ".\xml\etree\ElementTree.py", line 862, in parse
  File ".\xml\etree\ElementTree.py", line 581, in parse
  File ".\xml\etree\ElementTree.py", line 1118, in __init__
ImportError: No module named expat; use SimpleXMLTreeBuilder instead