pyinstaller packaging error: RecursionError: maximum recursion depth exceeded, UnicodeDecodeError solution

The reason:

    This error means that exceeds the maximum recursion depth, python default recursion depth default is 1000), so when the recursion depth exceeded will trigger this exception.

Solution:

  1. Perform pyinstaller -F XXX.py it will generate a directory in your file XXX.spec file and error, the class appears abnormal.

  2. Open XXX.spec file, add the above two lines of code at the beginning.

  import sys
  sys.setrecursionlimit(1000000)

3. Continue package, but also the file name: pyinstaller -F XXX.spec, execute the file.

Guess you like

Origin www.cnblogs.com/patrickstar2019/p/11465220.html