Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update finder.py to fix RecursionError: maximum recursion depth exceeded #2272

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

WoolenWang
Copy link

if module is to much , RecursionError: maximum recursion depth exceeded , fix to scan_code new one thread

File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 348, in _internal_import_module module = self._load_module( File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 415, in _load_module self._load_module_code(module, loader, deferred_imports) │ │ │ └ [(<Module name='scipy.interpolate.fitpack', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/scipy/interpolate/fitpack.p... │ │ └ <_frozen_importlib_external.SourceFileLoader object at 0x000001DBA2FF5410> │ └ <Module name='sympy.printing.pretty', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/sympy/printing/pretty/__init__.py... └ <cx_Freeze.finder.ModuleFinder object at 0x000001DB8B286ED0> File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 465, in _load_module_code self._scan_code(module.code, module, deferred_imports) │ │ │ └ [(<Module name='scipy.interpolate.fitpack', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/scipy/interpolate/fitpack.p... │ │ └ <Module name='sympy.printing.pretty', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/sympy/printing/pretty/__init__.py... │ └ <Module name='sympy.printing.pretty', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/sympy/printing/pretty/__init__.py... └ <cx_Freeze.finder.ModuleFinder object at 0x000001DB8B286ED0> File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 626, in _scan_code imported_module = self._import_module( File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 294, in _import_module module = self._internal_import_module(name, deferred_imports) │ │ └ [(<Module name='scipy.interpolate.fitpack', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/scipy/interpolate/fitpack.p... │ └ 'sympy.printing.pretty.pretty' └ <cx_Freeze.finder.ModuleFinder object at 0x000001DB8B286ED0> File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 348, in _internal_import_module module = self._load_module( File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 415, in _load_module self._load_module_code(module, loader, deferred_imports) │ │ │ └ [(<Module name='scipy.interpolate.fitpack', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/scipy/interpolate/fitpack.p... │ │ └ <_frozen_importlib_external.SourceFileLoader object at 0x000001DBA2FF6AD0> │ └ <Module name='sympy.printing.pretty.pretty', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/sympy/printing/pretty/pret... └ <cx_Freeze.finder.ModuleFinder object at 0x000001DB8B286ED0> File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 465, in _load_module_code self._scan_code(module.code, module, deferred_imports) │ │ │ └ [(<Module name='scipy.interpolate.fitpack', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/scipy/interpolate/fitpack.p... │ │ └ <Module name='sympy.printing.pretty.pretty', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/sympy/printing/pretty/pret... │ └ <Module name='sympy.printing.pretty.pretty', file=WindowsPath('E:/git/python-3.11.6/Lib/site-packages/sympy/printing/pretty/pret... └ <cx_Freeze.finder.ModuleFinder object at 0x000001DB8B286ED0> File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 626, in _scan_code imported_module = self._import_module( File "E:\git\python-3.11.6\Lib\site-packages\cx_Freeze\finder.py", line 260, in _import_module module = self._internal_import_module(name, deferred_imports) │ │ └ [(<Mod

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.13%. Comparing base (e6b15a7) to head (73c441f).
Report is 243 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2272      +/-   ##
==========================================
+ Coverage   83.10%   83.13%   +0.02%     
==========================================
  Files          27       27              
  Lines        4026     4031       +5     
==========================================
+ Hits         3346     3351       +5     
  Misses        680      680              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

WoolenWang and others added 2 commits April 20, 2024 14:32
if module is to much , RecursionError: maximum recursion depth exceeded , fix to scan_code new one thread
@brummel-promed
Copy link

I just got this recursion error with cx_Freeze 7.1.1. I was able to work around it by changing my build_exe_options to exclude a number of things, including scipy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants