Question

The other person 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?

Was it helpful?

Solution

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 :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top