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

RecursionError: maximum recursion depth exceeded while calling a Python object #138

Closed
hacksysteam opened this issue Sep 15, 2024 · 4 comments · Fixed by #140
Closed

RecursionError: maximum recursion depth exceeded while calling a Python object #138

hacksysteam opened this issue Sep 15, 2024 · 4 comments · Fixed by #140

Comments

@hacksysteam
Copy link
Contributor

Hi @mstorsjo

Running this command gives error:

python vsdownload.py --accept-license --print-deps-tree Microsoft.VisualStudio.Workload.VCTools

Microsoft.VisualStudio.PackageGroup.Debugger.Core
        Microsoft.VisualStudio.Debugger
          Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
            Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
              Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
                Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
                  Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
                    Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
                      Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client
Traceback (most recent call last):
  File "/tmp/msvc-wine/vsdownload.py", line 654, in <module>
    printDepends(packages, i, "", None, "", args)
  File "/tmp/msvc-wine/vsdownload.py", line 295, in printDepends
    printDepends(packages, key, type, chip, indent + "  ", args)
  File "/tmp/msvc-wine/vsdownload.py", line 295, in printDepends
    printDepends(packages, key, type, chip, indent + "  ", args)
  File "/tmp/msvc-wine/vsdownload.py", line 295, in printDepends
    printDepends(packages, key, type, chip, indent + "  ", args)
  [Previous line repeated 994 more times]
  File "/tmp/msvc-wine/vsdownload.py", line 282, in printDepends
    p = findPackage(packages, target, chip)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/msvc-wine/vsdownload.py", line 249, in findPackage
    id = id.lower()
         ^^^^^^^^^^
RecursionError: maximum recursion depth exceeded while calling a Python object
@hacksysteam
Copy link
Contributor Author

this works but i'm not sure if this will cause any issues

def printDepends(packages, target, deptype, chip, indent, args):
     chipstr = ""
     if chip != None:
@@ -286,6 +558,8 @@ def printDepends(packages, target, deptype, chip, indent, args):
         deps = p["dependencies"]
         for key in deps:
             dep = deps[key]
+            if key == p["id"]:
+                continue
             type = ""
             if "type" in dep:
                 type = dep["type"]
@@ -294,6 +568,7 @@ def printDepends(packages, target, deptype, chip, indent, args):
                 chip = dep["chip"]
             printDepends(packages, key, type, chip, indent + "  ", args)

@huangqinjin
Copy link
Contributor

huangqinjin commented Sep 15, 2024

Related to #135 .

From the manifest, the dependency chain is

Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client (machineArch: arm64)
  Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client (machineArch: x64)
    Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client (machineArch: x86)
      (no dependencies)

But machineArch is not handled currently, so the dependency chain is parsed as

Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client (machineArch: arm64)
  Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client (machineArch: arm64)
    ...

@hacksysteam
Copy link
Contributor Author

@huangqinjin have you encountered this issue: #139

@hacksysteam
Copy link
Contributor Author

@huangqinjin the issue got fixed after applying your pull request: #140

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

Successfully merging a pull request may close this issue.

2 participants