sqlite3.OperationalError๊ฐ ๋ฐ์ํ์ต๋๋ค: ์ฝ๊ธฐ ์ ์ฉ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์์ฑํ๋ ค๊ณ ํฉ๋๋ค.
(์คํ ์ถ์ ์ฒจ๋ถ). ์ด๊ฒ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฐ๊ฒฐ๊ณผ ๊ด๋ จ๋ ์ค๋ฅ์ธ ๊ฒ ๊ฐ์ผ๋ฏ๋ก ์ค๋ฅ ๋ฉ์์ง๊ฐ ๋ ์ ํํ ์ ์์ต๋๋ค(๋ด ๊ฐ์ ์์ฒญ). ์คํจํ ์ฐ๊ฒฐ ๋งค๊ฐ๋ณ์(์ต์ํ ํธ์คํธ ๋ฐ ํฌํธ)๋ฅผ ์ง์ ํฉ๋๋ค. ํ๋ก๊ทธ๋จ์์ ์์ํ ๋ด์ฉ์ด ๋ฌด์์ธ์ง๋ ๋ถ๋ช
ํ์ง ์์ต๋๋ค.
์คํ ์ถ์
์๋ ์์ธ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
์ญ์ถ์ (๊ฐ์ฅ ์ต๊ทผ ํธ์ถ ๋ง์ง๋ง):
ํ์ผ "/usr/bin/ipython", 7ํ,
launch_new_instance()
launch_new_instance์ ํ์ผ "/mnt/DATA/sources/ipython/IPython/frontend/terminal/ipapp.py", 388ํ
์ฑ ์ด๊ธฐํ()
ํ์ผ "
catch_config_error์ ํ์ผ "/mnt/DATA/sources/ipython/IPython/config/application.py", 84ํ
๋ฐํ ๋ฐฉ๋ฒ(์ฑ, _args, _kwargs)ํ์ผ "/mnt/DATA/sources/ipython/IPython/frontend/terminal/ipapp.py", 324ํ, ์ด๊ธฐํ ์คself.init_shell()ํ์ผ "/mnt/DATA/sources/ipython/IPython/frontend/terminal/ipapp.py", 340ํ, init_shellipython_dir=self.ipython_dir)ํ์ผ "/mnt/DATA/sources/ipython/IPython/config/configurable.py", ์๋ฅผ ๋ค์ด 318ํinst = cls(_args, *_kwargs)ํ์ผ "/mnt/DATA/sources/ipython/IPython/frontend/terminal/interactiveshell.py", 360ํ, ์ด๊ธฐํuser_module=user_module, custom_exceptions=custom_exceptionsํ์ผ "/mnt/DATA/sources/ipython/IPython/core/interactiveshell.py", 436ํ, ์ด๊ธฐํself.init_history()ํ์ผ "/mnt/DATA/sources/ipython/IPython/core/interactiveshell.py", init_history์ 1489ํself.history_manager = HistoryManager(shell=self, config=self.config)ํ์ผ "/mnt/DATA/sources/ipython/IPython/core/history.py", 409ํ, ์ด๊ธฐํself.new_session()ํ์ผ "
new_session์์ ํ์ผ "/mnt/DATA/sources/ipython/IPython/core/history.py", 427ํ
NULL, "") """, (datetime.datetime.now(),))
sqlite3.OperationalError: ์ฝ๊ธฐ ์ ์ฉ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฐ๊ธฐ ์๋
python -c "IPython ๊ฐ์ ธ์ค๊ธฐ; print(IPython.sys_info())" ์ถ๋ ฅ:
์ด์ ๋ณด๊ณ ์์ ํ์ผ์ ์ฒจ๋ถํ ์ ์๊ณ ์ด๋ฏธ ์ปค๋ฐ๋ ์ด์๋ฅผ ๊ฒ์ํ ์ ์๋ ๊ฐ๋ฅ์ฑ(!!)์ด ์์ผ๋ฉด ์ข์ ๊ฒ์ ๋๋ค.
sqlite๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์๋ฒ๊ฐ ์๋ ํ์ผ์ ์ฌ์ฉํฉ๋๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก ~/.ipython/profile_default/history.sqlite
๋ฉ๋๋ค. ํด๋น ํ์ผ์ด ์กด์ฌํ๋ฉฐ ์ฐ๊ธฐ ๊ฐ๋ฅํฉ๋๊น?
ํํธ๋ฅผ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค! ํ์ผ์ ์๋ชป๋ ๊ถํ์ด ์์ต๋๋ค(์ฐ๊ธฐ ๋ถ๊ฐ๋ฅ). ์ค๋ฅ ๋ฉ์์ง/์ถ๋ ฅ์ ๊ฐ์ ํ ๊ฒ์ ์ ์ํฉ๋๋ค.
๋ฌธ์ ๋ณด๊ณ ์์ ํ์ผ์ ์ฒจ๋ถํ ์ ์๋ ๊ฐ๋ฅ์ฑ์ด ์์ผ๋ฉด ์ข์ ๊ฒ์ ๋๋ค.
์์ ์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ผ๋ฐ์ ์ ๋๋ค.
์ด๋ฏธ ์ปค๋ฐ๋ ๋ฌธ์ ๋ฅผ ๊ฒ์ํ ์ ์์ต๋๋ค(!!).
๊ฒ์ ํ๋๋ ํ์ด์ง ์๋จ์ ์์ต๋๋ค.
๋๋ ์ด๊ฒ์ ์๋ํ๊ณ ํจ๊ณผ๊ฐ ์์๋ค. @takluyver , @richtekp ๊ฐ์ฌํฉ๋๋ค.
~/.ipython/profile_default/history.sqlite
/Users/ChessTastic/.ipython/profile_default/history.sqlite.
โ profile_default sudo chmod a+w history.sqlite
Password:
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋๋ ์ด๊ฒ์ ์๋ํ๊ณ ํจ๊ณผ๊ฐ ์์๋ค. @takluyver , @richtekp ๊ฐ์ฌํฉ๋๋ค.