こんにちは。
PySimpleGUIにて画像を表示させようとしているのですが、以下のエラーが出てしまいます。
Look in this Window's layout for an Image element that has a key of 0
The error occuring is:
couldn't open 'png.png' no such file or directory
ソースコードは以下です。
import PySimpleGUI as sg
layout = [[sg.Button('Start'), sg.Button('Next')],
[sg.Image('png.png')]]
window = sg.Window('sample', layout)
event, values = window.read()
window.close()
ソースコードと同じ階層にpng.pngというファイルはあります。
パスの指定の仕方が間違っているのでしょうか。よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/05/06 04:38