国土数値情報を一括DLしようとしたがうまくできん
https://qiita.com/mits003/items/2c8c77514a09aee99cc0
これを参考にした
おそらくpythonで躓いた
■ このスレッドは過去ログ倉庫に格納されています
1デフォルトの名無しさん
2021/11/11(木) 20:20:25.05ID:M474n1nU2デフォルトの名無しさん
2021/11/11(木) 20:22:22.81ID:M474n1nU C:\Users\cucum>python mlit_ksj_dl.py https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-L03-a.html
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: use options instead of chrome_options
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
Traceback (most recent call last):
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
C:\Users\cucum\mlit_ksj_dl.py:50: DeprecationWarning: use options instead of chrome_options
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
Traceback (most recent call last):
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
3デフォルトの名無しさん
2021/11/11(木) 20:22:37.48ID:M474n1nU During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\cucum\mlit_ksj_dl.py", line 115, in <module>
dl_dir = file_dl(DRIVER_PATH)
File "C:\Users\cucum\mlit_ksj_dl.py", line 50, in file_dl
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__
self.service.start()
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 84, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
Traceback (most recent call last):
File "C:\Users\cucum\mlit_ksj_dl.py", line 115, in <module>
dl_dir = file_dl(DRIVER_PATH)
File "C:\Users\cucum\mlit_ksj_dl.py", line 50, in file_dl
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__
self.service.start()
File "C:\Users\cucum\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 84, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
4デフォルトの名無しさん
2021/11/11(木) 20:23:19.70ID:M474n1nU コマンドプロンプトに入力すると↑が出て解説通りにならん
何がダメなのか教えてくださいm(__)m
何がダメなのか教えてくださいm(__)m
5デフォルトの名無しさん
2021/11/11(木) 20:57:16.41ID:M474n1nU C:\Users\cucum>python mlit_ksj_dl.py https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-L03-a.html
python: can't open file 'C:\Users\cucum\mlit_ksj_dl.py': [Errno 2] No such file or directory
こっちだった
解説通りにやるとpyファイルにたどり着かないです
python: can't open file 'C:\Users\cucum\mlit_ksj_dl.py': [Errno 2] No such file or directory
こっちだった
解説通りにやるとpyファイルにたどり着かないです
6デフォルトの名無しさん
2021/11/11(木) 22:02:46.50ID:1oMtSCiX pyファイルはどこにあるんだ
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 「偽サッチャー」「自滅的」「時代遅れ」 高市首相の経済政策を海外メディアが酷評 [蚤の市★]
- 高市首相の答弁書に「台湾有事答えない」と明記 存立危機発言当時 ★3 [蚤の市★]
- 【ド軍】山本由伸、WBC出場を決断!ドジャースが本人の意向を尊重、佐々木朗希はチームが故障歴を懸念で不参加 [鉄チーズ烏★]
- 米大統領報道官「日本と強固な同盟維持、中国とも協力」 [少考さん★]
- JA全農が「新おこめ券」…来年9月末の有効期限を新設、必要経費のみ上乗せ ★2 [蚤の市★]
- 秋田内陸縦貫鉄道「列車が脱線、転覆」と通報 北秋田市、萱草駅付近 [蚤の市★]
- 【画像】海外の寿司パーティー、レベチwwwwwwwwww [834922174]
- お前らってほんとに純正品?
- 中国人、超ド正論。「チベットやウイグルに住んでるのはチベット族やウイグル族だが、アイヌから奪った土地に住んでる日本人こそ侵略者」 [314039747]
- ばっかもーん、そいつが
- 今年の漢字、きょう発表😉 [583597859]
- 徳島のファッションイベント、生成AIでポスターを作ってしまうwwwwwwwwwwww
