“maximum recursion depth exceeded” while packaging py file with py2exe

前端 未结 3 1790
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 02:37

The py2exe worked quite well on the same py file several months ago. But when I tried it again today it failed by reporting a “RuntimeError: maximum recursion depth exceeded

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-13 03:14

    I'd try to increase recursion depth limit. Insert at the beginning of your file:

    import sys
    sys.setrecursionlimit(5000)
    

提交回复
热议问题