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

Closed
cwjohnson42 opened this issue Oct 22, 2024 · 2 comments
Closed

debugpy adapter installation fails #272

cwjohnson42 opened this issue Oct 22, 2024 · 2 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.

@Jeff900
Copy link

Jeff900 commented Nov 21, 2024

Also ran into this issue. I'm not really familiar with how this (packages etc.) works under the hood in ST4. @cwjohnson42, may I ask what was your approach with your fix? I assume you did some things manually. I have had a look at the code, but don't know the steps to fix it manually. I would also be happy to read some general documentation about it if there is something available.

@8Observer8
Copy link

8Observer8 commented Dec 23, 2024

@cwjohnson42 @Jeff900 hello. It was fixed. Just try to install the Debugger again.

#283

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

4 participants