RecursionError maximun recursion depth exceeded while calling a python object

来源:互联网 发布:淘宝购手机 编辑:程序博客网 时间:2024/06/01 08:47

今天执行在执行自己编写的图片浏览软件的时候, 触发了这个问题”recursionError maximun recursion depth exceeded while calling a python object”
这里写图片描述
通过万能的百度,找到了答案, 原因是默认的递归深度不够, 递归的次数超过了默认的限制, 直接修改默认递归次数即可:

import syssys.setrecursionlimit(10**10)  # set the maximum depth as 1010次方
阅读全文
0 0
原创粉丝点击