Global Name Error when deploying with Fabric
The other per开发者_运维问答son on my dev team has been deploying our Django app to the server via Fabric. Since I need to be able to deploy as well I setup Fabric on my system, but when I try to deploy I get a Global Name error:
File ".../fabfile.py", line 4, in staging
config.settings = 'staging'
NameError: global name 'config' is not defined
Since we know the fabfile is fine, it must be a problem in my setup. Any ideas?
ohhh i know this error , this error is happening because you have installed in your machine fabric version higher than 0.9 and the fabric file that you want to use has been developed using and old version of fabric < 0.9.
For more detail the config
obj has been replaced with env
in fabric 0.9 so if you run yor fabfile
using fabric version higher than 0.9 it will not recognize the config
object.
so you should install an old version of the fabric package or just update your fabfile i think it's time for that :)
Hope this can help you :)
精彩评论