Dedockify
Dedockify copied to clipboard
`TypeError: 'NoneType' object is not subscriptable` (`self.hist = self.cli.history(self.img['RepoTags'][0])`)
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
same.
you can use
self.hist = self.cli.history(self.img['RepoDigests'][0])

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