Anyone have Upload Template Errors w/ Fabric when going from 1.3 to 1.4.6?

157 views
Skip to first unread message

Max Resnick

unread,
May 11, 2013, 4:40:19 PM5/11/13
to mezzani...@googlegroups.com
Hi Everyone -

I'm working on upgrading from 1.3 to 1.4.6.  While I have no actually issues performing the update with my current site, it seems Fabric Deploy doesn't want to work for me anymore.

I had modified the fabfile.py so that it would deploy to a staging and production.  I also modified it so that the project's database name and project name could be different.  It's had worked just fine, but after upgrading to 1.4.6 it seems to have no love for me anymore. :-(

I've tried with both the as release fabfile and my modifications.  both happily preform 'fab all' but spit out the following traceback after I attempt to apply 'fab deploy'

If it helps here: my repo https://github.com/grumps/ofmax

If anyone has a suggest on how to can work on debugging I'd love the advise.  Thanks.

I've tried to debug but seems it a bit beyond me at the moment:
Traceback (most recent call last):
  File "/home/grumps/.virtualenvs/ofmax2/local/lib/python2.7/site-packages/fabric/main.py", line 736, in main
    *args, **kwargs
  File "/home/grumps/.virtualenvs/ofmax2/local/lib/python2.7/site-packages/fabric/tasks.py", line 314, in execute
    multiprocessing
  File "/home/grumps/.virtualenvs/ofmax2/local/lib/python2.7/site-packages/fabric/tasks.py", line 211, in _execute
    return task.run(*args, **kwargs)
  File "/home/grumps/.virtualenvs/ofmax2/local/lib/python2.7/site-packages/fabric/tasks.py", line 121, in run
    return self.wrapped(*args, **kwargs)
  File "/home/grumps/projects/ofmax/fabfile.py", line 186, in logged
    return func(*args, **kawrgs)
  File "/home/grumps/projects/ofmax/fabfile.py", line 481, in deploy
    upload_template_and_reload(name)
  File "/home/grumps/projects/ofmax/fabfile.py", line 226, in upload_template_and_reload
    upload_template(local_path, remote_path, env, use_sudo=True, backup=False)
  File "/home/grumps/.virtualenvs/ofmax2/local/lib/python2.7/site-packages/fabric/contrib/files.py", line 111, in upload_template
    text = text % context
TypeError: not enough arguments for format string
Disconnecting from 127.0.0.1:2222... done.



Stephen McDonald

unread,
May 11, 2013, 6:59:00 PM5/11/13
to mezzani...@googlegroups.com
It's probably related to this change:


It tries to escape any percentages in deploy templates that don't look like variable substitution, eg turn % into %% if it doesn't look like %(this)s

Your best bet in debugging it would be to wrap the upload_template call in try/catch, then look at which template it's failing on:


Would become:

try:
    upload_template(local_path, remote_path, env, use_sudo=True, backup=False)
except:
    print local_path, env 







--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Stephen McDonald
http://jupo.org

Max Resnick

unread,
May 11, 2013, 9:32:02 PM5/11/13
to mezzani...@googlegroups.com, st...@jupo.org
Hi Stephen -

Thanks for your continual responses and work on the Mezzanine.  I'll give it a shot and provide my findings. 

thanks!

Max

Max Resnick

unread,
May 12, 2013, 3:37:33 PM5/12/13
to mezzani...@googlegroups.com, st...@jupo.org
I've discovered it was my nginx.conf ... re-write that was causing the issue.
rewrite ^(.*) http://%(live_host)$1 permanent

I'm guessing it's one of the special characters?  Maybe I'm doing the re-write correctly? NGINX isn't complaining...?

So anyway a big thanks to Stephen for getting my started on debugging.
Reply all
Reply to author
Forward
0 new messages