Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'template_name' on export to HTML #47

Closed
jonand opened this issue Feb 26, 2014 · 1 comment
Closed

KeyError: 'template_name' on export to HTML #47

jonand opened this issue Feb 26, 2014 · 1 comment
Labels

Comments

@jonand
Copy link

jonand commented Feb 26, 2014

I just installed OmniMarkupPreviewer on Sublime 3 through Package Control. Tried Ctrl+Alt+O on a markdown file which previewed the file in browser as expected.

Then I tried to export to HTML using Ctrl+Alt+X which didn't work:

error: Error while exporting, please check your console for more information.
OmniMarkupPreviewer: [ERROR] Error while exporting
  Traceback (most recent call last):
    File "C:\SublimeText3\Data\Packages\OmniMarkupPreviewer\OmniMarkupPreviewer.py", line 169, in run
    html_content = RendererManager.render_view_as_html(view)
    File "C:\SublimeText3\Data\Packages\OmniMarkupPreviewer\OmniMarkupLib\RendererManager.py", line 329, in render_view_as_html
    return template(setting.export_options['template_name'],
  KeyError: 'template_name'

Copying the "export_options" from OmniMarkupPreviewers default settings to the User settings seems to have solved the problem.

A possibly related discrepancy:
In OmniMarkupPreviewer.sublime-settings it is mentioned that templates should be placed into ${packages}/User/OmniMarkupPreviewer/templates/. In my installation OmniMarkupPreviewer not installed in the User folder but to ${packages}/OmniMarkupPreviewer while ${packages}/User/OmniMarkupPreviewer was empty.

@timonwong
Copy link
Owner

Thanks for your comprehensive bug report, I regret I just forgot to fix that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants