When I attempt to run a python program in ST3 by typing ⌘-B, I am suddenly getting unicode errors, because the python installation seems to have switched to ascii.
For example, running:
import sys
print(sys.version)
print("\u2318")
I get the following output:
3.6.5 (default, Mar 29 2018, 15:38:43)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
Traceback (most recent call last):
File "/Users/jpsteinb/Dropbox/40_chapters/shared_code/test2.py", line 4, in <module>
print("\u2318")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2318' in position 0: ordinal not in range(128)
But if I run the same program from the shell, I get…
3.6.5 (default, Mar 29 2018, 15:38:43)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
⌘
…with no error. I get similar errors as above anytime I try to print a unicode character, or read one from file.
I can’t figure out what I did—I don’t recall installing any packages, etc. I have tried quitting sublime text and even restarting the computer, to no avail.
====
EDIT: After restarting the computer a second time, the problem went away.
BUT: Five minutes later, the problem came back again. I’m getting the same error messages and did nothing in particular that I can figure out.