diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index e4bf1314a4..ecefdaf941 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -373,6 +373,7 @@ def main(argv): dir, latex_file = os.path.split(input_path) # Echo the settings + progress("Running Python %s" % str(sys.version_info[:3])) progress("Starting %s..." % script_name) progress("Output format: %s" % output_format) progress("Foreground color: %s" % fg_color) @@ -394,6 +395,11 @@ def main(argv): fg_color_dvipng = make_texcolor(fg_color, False) bg_color_dvipng = make_texcolor(bg_color, False) + # For python > 2 convert bytes to string + if not PY2: + fg_color_dvipng = fg_color_dvipng.decode('ascii') + bg_color_dvipng = bg_color_dvipng.decode('ascii') + # External programs used by the script. latex = find_exe_or_terminate(latex or latex_commands) bibtex = find_exe(bibtex or bibtex_commands) diff --git a/status.23x b/status.23x index a9f823323f..93202c5d00 100644 --- a/status.23x +++ b/status.23x @@ -162,6 +162,8 @@ What's new - Fix TeX file listing with the Nix package manager. +- Fix Python detection routines, and so instant preview on some platforms + (bug 11282). * DOCUMENTATION AND LOCALIZATION