本文主要記錄一些學(xué)習(xí)Python中的小知識以及遇到的坑(持續(xù)更新)
1. 最坑爹的錯誤(Not a git repository (or any of the parent directories): .git)
在學(xué)習(xí)requests時,使用gunicorn和httpbin搭建測試環(huán)境的時候,在virtualenv環(huán)境中使以下用命令時候終端出現(xiàn)了這個錯誤。
>>>> gunicorn httpbin:app
開始還以為是我安裝gunicorn或者是httpbin出錯了,經(jīng)過排查發(fā)現(xiàn),原來是我的zsh出現(xiàn)了問題,真是坑爹。
解決方法:
>>>> cd ~/.oh-my-zsh
>>>> git remote add origin https://github.com/robbyrussell/oh-my-zsh.git
>>>> git fetch
>>>> git reset --hard origin/master
這里是參考文件