回答編集履歴

2

体裁を整えた

2022/04/05 14:08

投稿

stakezo
stakezo

スコア43

test CHANGED
@@ -1,20 +1,31 @@
1
1
  同症状で悩んでここにたどり着いたので自分の解決方法を載せます。(プログラミングと関係ある話だと思うので)
2
+ 動作環境は
3
+ Windows10
4
+ VisualStudio Code
5
+
2
6
  私の場合、以下のような症状がでていました。
7
+ ```ここに言語を入力
8
+ C:\Users\aaa\anaconda3\lib\site-packages\PIL\Image.py:2966: UserWarning: image file could not be identified because WEBP support not installed
3
- ====================
9
+ warnings.warn(message)
10
+ Traceback (most recent call last):
11
+ File "d:\sample\test.py", line 653, in PBStart
12
+ elif self.ui.RB_F010.isChecked() : self.RB_F010()
13
+ File "d:\sample\test.py", line 625, in RB_F010
4
- im = Image.open(r'D:\photo.webp')
14
+ im = Image.open(r'D:\photo.webp')
5
15
  File "C:\Users\aaa\anaconda3\lib\site-packages\PIL\Image.py", line 2967, in open
6
16
  raise UnidentifiedImageError(
7
- PIL.UnidentifiedImageError: cannot identify image file 'D:\photo.webp'
17
+ PIL.UnidentifiedImageError: cannot identify image file 'D:\\photo.webp'
8
- # =====================
18
+ ```
9
-
10
- PIL(pillow)にかかわるバージョン情報
19
+ PIL(pillow)にかかわるバージョン情報
20
+ ```ここに言語を入力
11
- PS D:\aaa> pip list
21
+ PS D:\sample> pip list
12
22
  Package Version
13
23
  ------------------
14
24
  Pillow 8.2.0
15
- # =====================
25
+ ```
16
- PIL(pillow) をアンインストールしてインストールし直す
26
+ PIL(pillow) をアンインストールしてインストールし直す
27
+ ```ここに言語を入力
17
- PS D:\aaa> pip uninstall Pillow
28
+ PS D:\sample> pip uninstall Pillow
18
29
  Found existing installation: Pillow 8.2.0
19
30
  Uninstalling Pillow-8.2.0:
20
31
  Would remove:
@@ -22,14 +33,13 @@
22
33
  c:\users\aaa\anaconda3\lib\site-packages\pillow-8.2.0.dist-info\*
23
34
  Proceed (y/n)? y
24
35
  Successfully uninstalled Pillow-8.2.0
25
-
36
+ ```
37
+ ```ここに言語を入力
26
- PS D:\aaa> pip install Pillow
38
+ PS D:\sample> pip install Pillow
27
39
  Collecting Pillow
28
40
  Downloading Pillow-9.1.0-cp38-cp38-win_amd64.whl (3.3 MB)
29
41
  |████████████████████████████████| 3.3 MB 3.3 MB/s
30
42
  Installing collected packages: Pillow
31
43
  Successfully installed Pillow-9.1.0
32
-
44
+ ```
33
-
34
- これでエラーが出なくなりました。
45
+ これでエラーが出なくなりました。
35
-

1

---部分のフォーマットが変換されたので全角へ変更

2022/04/05 13:55

投稿

stakezo
stakezo

スコア43

test CHANGED
@@ -10,7 +10,7 @@
10
10
  # PIL(pillow)にかかわるバージョン情報
11
11
  PS D:\aaa> pip list
12
12
  Package Version
13
- ---------------------------------- -------------------
13
+ ------------------
14
14
  Pillow 8.2.0
15
15
  # =====================
16
16
  # PIL(pillow) をアンインストールしてインストールし直す