Dedockify icon indicating copy to clipboard operation
Dedockify copied to clipboard

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

Open stdedos opened this issue 3 years ago • 3 comments

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

stdedos avatar Oct 21 '22 11:10 stdedos

same.

johndpope avatar Dec 06 '22 06:12 johndpope

you can use

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

johndpope avatar Dec 06 '22 06:12 johndpope

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"]
        }
    ]
}

johndpope avatar Dec 06 '22 06:12 johndpope