You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create .py file:
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:
Traceback (most recent call last):
File "_pydevd_bundle/pydevd_cython.pyx", line 532, in _pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception
File "C:\Users\Admin\anaconda3\envs\dominion\lib\linecache.py", line 30, in getline
lines = getlines(filename, module_globals)
File "C:\Users\Admin\anaconda3\envs\dominion\lib\linecache.py", line 46, in getlines
return updatecache(filename, module_globals)
File "C:\Users\Admin\anaconda3\envs\dominion\lib\linecache.py", line 137, in updatecache
lines = fp.readlines()
File "C:\Users\Admin\anaconda3\envs\dominion\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 71: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Admin\anaconda3\envs\dominion\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Admin\anaconda3\envs\dominion\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\debugpy\__main__.py", line 45, in <module>
cli.main()
File "c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 444, in main
run()
File "c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\debugpy/..\debugpy\server\cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "C:\Users\Admin\anaconda3\envs\dominion\lib\runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Users\Admin\anaconda3\envs\dominion\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\Admin\anaconda3\envs\dominion\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Admin\source\repos\PythonTestApplication1\PythonApplication1\PythonApplication1.py", line 1, in <module>
File "_pydevd_bundle/pydevd_cython.pyx", line 1366, in _pydevd_bundle.pydevd_cython.SafeCallWrapper.__call__
File "_pydevd_bundle/pydevd_cython.pyx", line 662, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 836, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 452, in _pydevd_bundle.pydevd_cython.PyDBFrame.handle_user_exception
File "_pydevd_bundle/pydevd_cython.pyx", line 535, in _pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception
File "C:\Users\Admin\anaconda3\envs\dominion\lib\linecache.py", line 30, in getline
lines = getlines(filename, module_globals)
File "C:\Users\Admin\anaconda3\envs\dominion\lib\linecache.py", line 46, in getlines
return updatecache(filename, module_globals)
File "C:\Users\Admin\anaconda3\envs\dominion\lib\linecache.py", line 137, in updatecache
lines = fp.readlines()
File "C:\Users\Admin\anaconda3\envs\dominion\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 71: invalid continuation byte
The thread 'MainThread' (0x1) has exited with code 0 (0x0).
The program 'python.exe' has exited with code 1 (0x1).
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:
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: