MySQLにファイルをインポートする時に一通りつまずく

目標:load dataしたい
https://dev.mysql.com/doc/refman/5.6/ja/load-data.html

・ERROR 1148 (42000): The used command is not allowed with this MySQL version と出た時は
 localファイルを許可していないことが原因なのでmysqlへの接続時に--local-infille=1と指定しておけばいい、という説を聞いたができない

・ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement と出た時は
 https://qiita.com/bohebohechan/items/207e87786b1e30f60abe
 localのMacなのでsecure-file-privを空にしてみた

・そもそもmysqldを叩いた時点でmysqld: Can't change dir to '/data/' (OS errno 2 - No such file or directory) と出る場合
 ちゃんとしたファイルを作ってみるか…

seleniumを久しぶりに使った時のメモ

久しぶりにseleniumpythonで使おうとした所、chromedriverが古くなっていた

selenium.common.exceptions.WebDriverException: Message: '2.20' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

このように答えが書いてあったため、アクセスして最新のchromedriverをインストールし、driverのpathとして指定した

driver = webdriver.Chrome(driver_path)

正常に作動したし昔より分かりやすくなっている…? 気がした


今度は(Element) is not clickableとのこと→actionchainを導入して動かした(クリックしたいelementをcommandとする)
https://javaworld.helpfulness.jp/post-254/

from selenium.webdriver.common.action_chains import ActionChains
actions = ActionChains(self.driver)
location = command.location_once_scrolled_into_view # commandの座標を取得
actions.move_by_offset(location["x"], location["y"]) # commandの座標まで動くというactionをセット
actions.click(command) # commandをクリックするというactionをセット
actions.perform() # セットしたactionを実行

Wordnet3.0のインストールに苦労した

WordNet3.0を入れようとしたところ、

stubs.c:43:14: error: ‘Tcl_Interp {aka struct Tcl_Interp}’ has no member named ‘result’
       interp -> result =
              ^
stubs.c:55:11: error: ‘Tcl_Interp {aka struct Tcl_Interp}’ has no member named ‘result’
    interp -> result = bitfieldstr;
           ^

と大量に怒られた

同じように困っている人がいて、要するにtclのバージョンが新しすぎて消滅した変数があったらしい
https://askubuntu.com/questions/372480/tcl-error-while-installing-wordnet/373364
助言どおり、コケたstubs.cで#define USE_INTERP_RESULT 1を前の方に入れてみたところ、makeが通った


ただし、python3に普通に入っていた…

from nltk.corpus import wordnet as wn
wn.get_version()
# 3.0