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

TypeError: 'NoneType' object is not subscriptable (self.hist = self.cli.history(self.img['RepoTags'][0])) #3

Open
stdedos opened this issue Oct 21, 2022 · 3 comments

Comments

@stdedos
Copy link

stdedos commented Oct 21, 2022

Traceback (most recent call last):
  File "/app/dedockify.py", line 55, in <module>
    __main__ = MainObj()
  File "/app/dedockify.py", line 16, in __init__
    self.hist = self.cli.history(self.img['RepoTags'][0])
TypeError: 'NoneType' object is not subscriptable

I think the problem is that I pulled an image as a sha256:xxx instead of a tagged one

@johndpope
Copy link

same.

@johndpope
Copy link

johndpope commented Dec 6, 2022

you can use

   self.hist = self.cli.history(self.img['RepoDigests'][0])

@johndpope
Copy link

Screenshot from 2022-12-06 17-11-24

you can easily debug with python - just set the args with image id.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true,
            "args" : ["2d398b66fa04"]
        }
    ]
}

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

2 participants