Closed liuhewei closed 11 years ago
I'm in Mac OSX 10.7.5 Lion and also encountered the problem mentioned above.
After changing tmp_file.write(contents.encode(...))
to tmp_file.write(contents)
the TypeError
is resolved, and "Copy as RTF" works well.
For some reason ST3 is unable to store user settings in the appropriate folder. Still investigating this one.
None of the commands are working for me, either. This is the output from the console:
Traceback (most recent call last):
File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 543, in run_
return self.run(edit, **args)
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/SublimeHighlight.py", line 118, in run
pygmented = self.highlight(output_type, full)
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/SublimeHighlight.py", line 107, in highlight
self.get_formatter(output_type, full))
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/SublimeHighlight.py", line 75, in get_formatter
fontface=settings.get('fontface', ''))
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/HighlightLib/pygments/formatters/__init__.py", line 51, in get_formatter_by_name
return cls(**options)
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/HighlightLib/pygments/formatters/html.py", line 372, in __init__
Formatter.__init__(self, **options)
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/HighlightLib/pygments/formatter.py", line 68, in __init__
self.full = get_bool_opt(options, 'full', False)
File "/Users/zenojevski/Library/Application Support/Sublime Text 3/Packages/SublimeHighlight/HighlightLib/pygments/util.py", line 58, in get_bool_opt
string, optname))
pygments.util.OptionError: Invalid type None for option full; use 1/0, yes/no, true/false, on/off
I have transitioned my folder to ST3 some time ago, so I'm guessing I may have stale configuration values from before, but I'm can't seem to find anything relevant.
SHould be fixed by #37 - Please reopen if that's not true.
I'm with the same error but I'm using ST2. Please help me.
My environment is win7-32, st 3 build3047. I cloned the branch "python3" into the package directory, but seems can't work well:
get_formatter()
inSublimeHighlight.py
, then the setting options can be obtained.tmp_file.write(contents.encode(...))
in functionwrite_file()
should be changed totmp_file.write(contents)
.After the 2 steps above, the "view as HTML" command works. But, "view as RTF" still can't work, seems the settings is ineffectual. And, "Copy to clipboard" can't work. The error exists in winclip library according to my python console:
Seems the winclip doesn't support win7 well? I don't know...