python maximum recursion depth exceeded 处理办法

时间:2023-03-09 17:25:12
python maximum recursion depth exceeded 处理办法

1.在执行命令 pyinstaller -F D:\py\programe\banksystem.py打包生成.exe文件时报错:python maximum recursion depth exceeded

2.处理办法分三步走:

#1.命令行输入:pyi-makespec -F D:\py\programe\清单核对\bomcheck.py,会生成一个bomcheck.spec文件

python maximum recursion depth exceeded 处理办法

#2.找到bomcheck.spec这个文件给它的第二行插入下面两行代码

import sys
sys.setrecursionlimit(50000)

#3.重新编译生成命令行输入:pyinstaller -F bomcheck.spec即可