Hey guys, just wanted to chime in with an error I was seeing, and what I did to fix. Python isn’t my strong point at all, so there’s likely something else wrong. But hopefully something will help. I’m using the last pasted code from above, rather than the github repo’s code. When I press ctrl-alt-n, I get an error:
Traceback (most recent call last):
File ".\sublime_plugin.py", line 356, in run_
return self.run(edit, **args)
File ".\PrintHtml.py", line 18, in run
File ".\xml\dom\minidom.py", line 1918, in parse
File ".\xml\dom\expatbuilder.py", line 922, in parse
IOError: [Errno 22] invalid mode ('rb') or filename: u'D:\\MyStuff\\Dropbox\\Software\\Sublime Text 2\\Data\\PackagesD:\\MyStuff\\Dropbox\\Software\\Sublime Text 2\\Data\\\\Themes - Light\\Colorized-704864249585081-Espresso Soda.tmTheme'
You can see the path to the theme is very crazy. I changed this:
doc = minidom.parse(path_packages + colour_scheme)
To this:
doc = minidom.parse(settings.get('color_scheme'))
And it works fine… I’m running in an irregular setup though. I’m using the USB version of ST2, and you can see in my path that I keep it stored in my Dropbox. So I don’t have the install in its usual location… not sure if that’s part of the problem or not. Oh, and I also created new locations for light and dark themes (as you can see in the path) to help my theme organization.
Hopefully something here helps you out… I’d love for this to be working 100%. Lastly, would it be possible to add a keybind for copying the html to the clipboard?