Sometimes Pinta or eclipse throws an error while opening the png file from the eclipse via Pinta, in such case you can use one of the following options to open the png file in the pinta.
Option 1: Open Pinta first, then click file, and open. Navigate to your CodaKid folder, then inside projects, then the project name, then src, then main, then resources, then assets, then foundations, then textures, then items.
There you will see your mySword.png. Open that, and it should open correctly. You can also use the same technique to open any other texture.
Option 2: While pressing left click on the png file move it onto the Pinta app(Drag and drop).