Update finder.py to fix RecursionError: maximum recursion depth exceeded #2272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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