質問編集履歴

6

追加

2020/04/20 00:13

投稿

person
person

スコア223

test CHANGED
File without changes
test CHANGED
@@ -122,7 +122,7 @@
122
122
 
123
123
 
124
124
 
125
- パスは追加してあるはず・・・。
125
+ システム環境変数 にパスは追加してあるはず・・・。
126
126
 
127
127
  再起動済み
128
128
 

5

追加

2020/04/20 00:13

投稿

person
person

スコア223

test CHANGED
File without changes
test CHANGED
@@ -84,4 +84,50 @@
84
84
 
85
85
  追記
86
86
 
87
+
88
+
89
+ エラー(sys.stderr = open('stderr.txt', 'w') で確認)
90
+
91
+ ```
92
+
93
+ Traceback (most recent call last):
94
+
95
+ File "site-packages\pdf2image\pdf2image.py", line 409, in pdfinfo_from_path
96
+
97
+ File "subprocess.py", line 804, in __init__
98
+
99
+ File "subprocess.py", line 1142, in _get_handles
100
+
101
+ OSError: [WinError 6] ハンドルが無効です。
102
+
103
+
104
+
105
+ During handling of the above exception, another exception occurred:
106
+
107
+
108
+
109
+ Traceback (most recent call last):
110
+
111
+ File "C:\Users\ユーザ名\Desktop\test.py", line 9, in <module>
112
+
113
+ images = convert_from_path(pdf)
114
+
115
+ File "site-packages\pdf2image\pdf2image.py", line 89, in convert_from_path
116
+
117
+ File "site-packages\pdf2image\pdf2image.py", line 430, in pdfinfo_from_path
118
+
119
+ pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?
120
+
121
+ ```
122
+
123
+
124
+
87
- エラー発生条件が違ったため書き直ました
125
+ パスは追加てあるはず・・・。
126
+
127
+ 再起動済み
128
+
129
+
130
+
131
+ ![popplerパス](033bba6f2a310f819f374a3959f49e7f.png)
132
+
133
+ ![popplerパス設定](e9e905450074e3283d736f26808bda13.png)

4

修正

2020/04/19 23:44

投稿

person
person

スコア223

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- 環境:Windows10で実行
1
+ 環境:Windows10
2
2
 
3
3
 
4
4
 

3

修正

2020/04/17 21:11

投稿

person
person

スコア223

test CHANGED
File without changes
test CHANGED
@@ -44,7 +44,7 @@
44
44
 
45
45
  該当のソースコード
46
46
 
47
- ```Python:
47
+ ```Python
48
48
 
49
49
  from pdf2image import convert_from_path
50
50
 

2

修正

2020/04/17 07:04

投稿

person
person

スコア223

test CHANGED
File without changes
test CHANGED
@@ -44,7 +44,7 @@
44
44
 
45
45
  該当のソースコード
46
46
 
47
- ```
47
+ ```Python:
48
48
 
49
49
  from pdf2image import convert_from_path
50
50
 

1

修正

2020/04/17 07:04

投稿

person
person

スコア223

test CHANGED
File without changes
test CHANGED
@@ -10,11 +10,11 @@
10
10
 
11
11
  エラー発生条件
12
12
 
13
- ・exe化するときのオプションに --noconsole を付ける
13
+ ・exe化するときのオプションに --noconsole --onefile の両方を付ける
14
14
 
15
15
 
16
16
 
17
- オプションに --onefile を付けても問題なく意図した動作になりますが、--noconsole --onefile のように --noconsoleを付けると
17
+ オプションに --onefile のように片方のオプションを付けても問題なく意図した動作になりますが、--noconsole --onefile のように 両方のオプションを付けると
18
18
 
19
19
  Failed to execute script main
20
20
 
@@ -79,3 +79,9 @@
79
79
  break
80
80
 
81
81
  ```
82
+
83
+
84
+
85
+ 追記
86
+
87
+ エラー発生条件が違ったため書き直しました