回答編集履歴

2

追記

2020/07/31 08:27

投稿

can110
can110

スコア38266

test CHANGED
@@ -9,3 +9,11 @@
9
9
  print(os.path.exists('/Users/wakatukikoutarou/Desktop/py2_samples/Chapter1/park.png'))
10
10
 
11
11
  ```
12
+
13
+
14
+
15
+ 追記
16
+
17
+ -----
18
+
19
+ [_tkinter.TclError: couldn't recognize data in image file "./chap3-back.png"](https://teratail.com/questions/85202)と類似のようです。お使いの環境の`Tcl/Tk`では`.png`はサポートされていない可能性があります。GIFに変換するか、この質問のように`Pillow`を使うと解消するかと思います。

1

追記

2020/07/31 08:27

投稿

can110
can110

スコア38266

test CHANGED
@@ -1 +1,11 @@
1
1
  macだと「C:/~」の「C:」はいらないのでは?
2
+
3
+ 以下を実行して`False`と出力されたらファイルが存在しないので、改めてファイルパスを確認してください。
4
+
5
+ ```Python
6
+
7
+ import os
8
+
9
+ print(os.path.exists('/Users/wakatukikoutarou/Desktop/py2_samples/Chapter1/park.png'))
10
+
11
+ ```