Decode error - output not utf-8

0

I'm using Sublime Text 2.0.2 for my work in Python 3. I get an error running it:

  

"Decode error - output not utf-8"

The strange thing is that running it in the Python Shell runs without problems.

code_example.py:

# -*- coding: utf-8 -*-

print ("Un texto con una \ttabulación")
    
asked by Myjael 10.09.2017 в 19:01
source

1 answer

0

I just found the answer and I share it with those who came across this same problem.

In the Sublime Text bar go to "Preferences", "Browse Packages", then to \ Sublime Text 2 \ Packages \ Python \ Python.sublime-build on the installed disk, add a comma and the following line:

"encoding": "cp1252"

So in the end we'll see this:

{     "cmd": ["python", "-u", "$ file"],     "file_regex": "^ [] File \" (... ?) \ ", line ([0-9] *)",     "selector": "source.python",     "encoding": "cp1252" }

Save the changes, close Sublime Text, open it again and everything will work again.

Greetings!

    
answered by 10.09.2017 в 19:20