Exception in thread Thread-7:
Traceback (most recent call last):
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 330, in find_cookie
line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 25: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "_pydevd_bundle/pydevd_cython.pyx", line 532, in _pydevd_bundle.pydevd_cython.PyDBFrame._handle_exception
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 16, in getline
lines = getlines(filename, module_globals)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 47, in getlines
return updatecache(filename, module_globals)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 136, in updatecache
with tokenize.open(fullname) as fp:
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 394, in open
encoding, lines = detect_encoding(buffer.readline)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 371, in detect_encoding
encoding = find_cookie(first)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 335, in find_cookie
raise SyntaxError(msg)
SyntaxError: invalid or missing encoding declaration for 'D:\\project\\desktop_jijun\\desktop_jijun\\desktop_jijun.py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 330, in find_cookie
line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 25: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\project\desktop_jijun\desktop_jijun\desktop_jijun.py", line 179, in consaltant
with sr.Microphone() as source:
File "_pydevd_bundle/pydevd_cython.pyx", line 1366, in _pydevd_bundle.pydevd_cython.SafeCallWrapper.__call__
File "_pydevd_bundle/pydevd_cython.pyx", line 322, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_exception
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\lry20\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 16, in getline
lines = getlines(filename, module_globals)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 47, in getlines
return updatecache(filename, module_globals)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 136, in updatecache
with tokenize.open(fullname) as fp:
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 394, in open
encoding, lines = detect_encoding(buffer.readline)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 371, in detect_encoding
encoding = find_cookie(first)
File "C:\Users\lry20\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 335, in find_cookie
raise SyntaxError(msg)
SyntaxError: invalid or missing encoding declaration for 'D:\\project\\desktop_jijun\\desktop_jijun\\desktop_jijun.py'
语音输入后爆出这个错误,原因是什么
最新发布