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