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

debugpy adapter installation fails #272

Open
cwjohnson42 opened this issue Oct 22, 2024 · 0 comments
Open

debugpy adapter installation fails #272

cwjohnson42 opened this issue Oct 22, 2024 · 0 comments

Comments

@cwjohnson42
Copy link

cwjohnson42 commented Oct 22, 2024

My attempts to install the debugpy adapter resulted in the error message TypeError: list indices must be integers or slices, not str. After poking around, I figured out that the problem was in modules/adapters/python.py on line 19. It seems that the structure of debugpy_info has changed and now the value of debugpy_info['any'] is a list not a dict:

{
  "any": [
    {
      "hash": {
        "sha256": "57b00de1c8d2c84a61b90880f7e5b6deaf4c312ecbde3a0e8912f2a56c4ac9ae"
      },
      "url": "https://files.pythonhosted.org/packages/51/b1/a0866521c71a6ae3d3ca320e74835163a4671b1367ba360a55a0a51e5a91/debugpy-1.8.7-py2.py3-none-any.whl"
    }
  ],
...

I was able to fix the error by replacing the line with

await util.request.download_and_extract_zip(debugpy_info['any'][0]['url'], f'{path}/debugpy', log=log)

but that may not be the best permanent solution.

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

No branches or pull requests

1 participant