Hi Chris, all,
I have just come across the same problem, and I could work around it by increasing the the recursion limit.
However, I think this problem warrants a closer look (and certainly some thought into how to debug it) because
in my particular case, it is *really* weird. Let me explain:
Say I have a script myscript.py which I want to turn into a standalone. The latter script imports a module, yt (see
yt-project.org)
as usual:
import yt.
I run PyInstaller on myscript.py and everything is fine. Now, I have another custom module, mymodule.py, which imports
yt as above. Now myscript.py *only* imports mymodule.py as usual:
import mymodule
I emphasise that the line above is the sole content of myscript.py, and the content of mymodule.py is just 'import yt'!
When I run PyInstaller on my myscript.py, I get the recursion error; more specifically [abridged]:
...
9872 INFO: Processing pre-safe import module hook six.moves from '/Users/tepper/Library/Python/3.7/lib/python/site-packages/PyInstaller/hooks/pre_safe_import_module/
hook-six.moves.py'.
=============================================================
A RecursionError (maximum recursion depth exceeded) occurred.
For working around please follow these instructions
=============================================================
How can that be??? Why importing the module yt directly works and doing it through an intermediary script fails?
It is worth stressing that so far, I have had this issue ONLY with yt, no other module, so it must be particular to the
yt library. However, I'd expect that a simple import like in the first case I described should fail as well.
Anyone has an idea why this happens and how to solve it?
Thor.
PS: My system's info:
39 INFO: PyInstaller: 4.2
39 INFO: Python: 3.7.9
45 INFO: Platform: Darwin-19.6.0-x86_64-i386-64bit
(macOS Catalina)