-
Notifications
You must be signed in to change notification settings - Fork 131
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
Non-UTF-8 code - Traceback not pointing to line with error #969
Labels
bug
Something isn't working
Comments
@fabioz Looks like the code path that uses linecache to retrieve source needs to handle this exception. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to Reproduce
from torch.utils.tensorboard import SummaryWriter
random_seed = 1 # ç
"Open in Terminal" and execute file gives this error message:
SyntaxError: Non-UTF-8 code starting with '\xe7' in file C:\Users\Admin\source\repos\PythonTestApplication1\PythonApplication1\PythonApplication1.py on line 4, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details
"Start" debugger in VS creates these error messages which do point to Anaconda but not to the cause of the problem:
Expected behavior
Same error message as if executed from Terminal
Configuration information (If you are providing a diagnostics file (see below), skip this section)
VS Version: Version 17.3.0 Preview 2.0
PTVS version: 17.0.22147.1
Python version: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
The text was updated successfully, but these errors were encountered: