質問編集履歴

2

エラーの出方が変わったので更新しました

2021/02/16 15:50

投稿

wmibfyuu1
wmibfyuu1

スコア0

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- ---
9
+ ```python
10
10
 
11
11
  !pip install selenium
12
12
 
@@ -26,7 +26,7 @@
26
26
 
27
27
  browser.implicitly_wait(3)
28
28
 
29
-
29
+ ```
30
30
 
31
31
  ---
32
32
 
@@ -52,15 +52,61 @@
52
52
 
53
53
  browser.implicitly_wait(3)
54
54
 
55
+ ```
56
+
55
57
  という部分を実行したところ、下記のようなエラーが出ました。
56
58
 
57
59
  ---------------------------------------------------------------------------
58
60
 
61
+ ```
62
+
63
+ ---------------------------------------------------------------------------
64
+
65
+ FileNotFoundError Traceback (most recent call last)
66
+
67
+ ~/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py in start(self)
68
+
69
+ 75 stderr=self.log_file,
70
+
71
+ ---> 76 stdin=PIPE)
72
+
73
+ 77 except TypeError:
74
+
75
+
76
+
77
+ ~/anaconda3/lib/python3.7/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
78
+
79
+ 774 errread, errwrite,
80
+
81
+ --> 775 restore_signals, start_new_session)
82
+
83
+ 776 except:
84
+
85
+
86
+
87
+ ~/anaconda3/lib/python3.7/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
88
+
89
+ 1521 err_msg += ': ' + repr(err_filename)
90
+
91
+ -> 1522 raise child_exception_type(errno_num, err_msg, err_filename)
92
+
93
+ 1523 raise child_exception_type(err_msg)
94
+
95
+
96
+
97
+ FileNotFoundError: [Errno 2] No such file or directory: 'MyPandas\chromedriver': 'MyPandas\chromedriver'
98
+
99
+
100
+
101
+ During handling of the above exception, another exception occurred:
102
+
103
+
104
+
59
105
  WebDriverException Traceback (most recent call last)
60
106
 
61
- <ipython-input-15-307f6af895e2> in <module>
107
+ <ipython-input-24-ba30553601fa> in <module>
62
108
 
63
- ----> 1 browser=webdriver.Chrome(executable_path='MyPandas/chromedriver.exe')
109
+ ----> 1 browser=webdriver.Chrome(executable_path='MyPandas\chromedriver')
64
110
 
65
111
  2 browser.implicitly_wait(3)
66
112
 
@@ -82,35 +128,19 @@
82
128
 
83
129
  ~/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py in start(self)
84
130
 
85
- 96 count = 0
131
+ 81 raise WebDriverException(
86
132
 
87
- 97 while True:
133
+ 82 "'%s' executable needs to be in PATH. %s" % (
88
134
 
89
- ---> 98 self.assert_process_still_running()
135
+ ---> 83 os.path.basename(self.path), self.start_error_message)
90
136
 
91
- 99 if self.is_connectable():
137
+ 84 )
92
138
 
93
- 100 break
139
+ 85 elif err.errno == errno.EACCES:
94
140
 
95
141
 
96
142
 
97
- ~/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py in assert_process_still_running(self)
98
-
99
- 109 raise WebDriverException(
100
-
101
- 110 'Service %s unexpectedly exited. Status code was: %s'
102
-
103
- --> 111 % (self.path, return_code)
104
-
105
- 112 )
106
-
107
- 113
108
-
109
-
110
-
111
- WebDriverException: Message: Service MyPandas/chromedriver.exe unexpectedly exited. Status code was: 1
143
+ WebDriverException: Message: 'MyPandas\chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
112
-
113
-
114
144
 
115
145
  ```
116
146
 

1

誤字を直した

2021/02/16 15:50

投稿

wmibfyuu1
wmibfyuu1

スコア0

test CHANGED
File without changes
test CHANGED
@@ -132,7 +132,7 @@
132
132
 
133
133
  ### 試したこと
134
134
 
135
- ファイルのパスの名前が間違っていいるのではないかと考え確認しました。しかしながらファイル名の記述法は、Dockerにおいてあるファイルなので
135
+ ファイルのパスの名前が間違っていいるのではないかと考え確認しました。しかしながらファイル名の記述法は、Dockerにおいてあるファイルなのでこれで正しいのではないかと思います。
136
136
 
137
137
  エラー名をコピーしてインターネットで検索をかけたのですが、何が原因でこうなっているのか知識に乏しい私に情報をかみ砕いて理解することが出来ませんでした。
138
138