Open er5555555 opened 1 month ago
根据你提供的错误信息,这里有几个可能的解决方案:
PermissionError: [WinError 5] 拒绝访问
表示程序没有足够的权限执行某些操作。你可以尝试以下方法:
确保你的 Tesseract 路径设置正确,并且可执行文件具有相应的权限。
pytesseract.pytesseract.tesseract_cmd = r'C:\Tesseract-OCR\tesseract.exe' # 检查路径是否正确
确保 tesseract.exe
可以被访问。
有时防火墙或杀毒软件会阻止程序的正常执行。你可以尝试:
确保所有相关依赖库都已经正确安装,尤其是 Pillow 和 pytesseract。你可以尝试重新安装这些库:
pip install --upgrade Pillow pytesseract
这咋办咋弄用安卓模拟器,没安卓啊 Traceback (most recent call last): File "C:/Users/yyh/Desktop/XiaoYuanKouSuan_Auto-main/小猿搜题.py", line 107, in
main()
File "C:/Users/yyh/Desktop/XiaoYuanKouSuan_Auto-main/小猿搜题.py", line 100, in main
numbers = recognize_numbers(image)
File "C:/Users/yyh/Desktop/XiaoYuanKouSuan_Auto-main/小猿搜题.py", line 24, in recognize_numbers
text = pytesseract.image_to_string(thresh, config='--psm 6')
File "C:\Users\yyh\Desktop\Python\lib\site-packages\pytesseract\pytesseract.py", line 486, in image_to_string
return {
File "C:\Users\yyh\Desktop\Python\lib\site-packages\pytesseract\pytesseract.py", line 489, in
Output.STRING: lambda: run_and_get_output(*args),
File "C:\Users\yyh\Desktop\Python\lib\site-packages\pytesseract\pytesseract.py", line 352, in run_and_get_output
run_tesseract(kwargs)
File "C:\Users\yyh\Desktop\Python\lib\site-packages\pytesseract\pytesseract.py", line 275, in run_tesseract
proc = subprocess.Popen(cmd_args, subprocess_args())
File "C:\Users\yyh\Desktop\Python\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\yyh\Desktop\Python\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] 拒绝访问。
C:\Users\yyh\Desktop\Python\lib\site-packages\coverage\report_core.py:115: CoverageWarning: Couldn't parse 'C:\Users\yyh\Desktop\XiaoYuanKouSuan_Auto-main\config-3.py': No source for code: 'C:\Users\yyh\Desktop\XiaoYuanKouSuan_Auto-main\config-3.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
C:\Users\yyh\Desktop\Python\lib\site-packages\coverage\report_core.py:115: CoverageWarning: Couldn't parse 'C:\Users\yyh\Desktop\XiaoYuanKouSuan_Auto-main\config.py': No source for code: 'C:\Users\yyh\Desktop\XiaoYuanKouSuan_Auto-main\config.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
Wrote XML report to C:\Users\yyh\AppData\Local\JetBrains\PyCharm2021.2\coverage\XiaoYuanKouSuan_Auto_main$.xml
进程已结束,退出代码为 0