mr.developer icon indicating copy to clipboard operation
mr.developer copied to clipboard

GitError, TypeError: not all arguments converted during string formatting

Open toutpt opened this issue 12 years ago • 2 comments

The typeerror comes from here, the fix is trivial: https://github.com/fschulze/mr.developer/blob/master/src/mr/developer/git.py#L158

output = action(**kwargs)

File "/home/zope/adria/rcse/production-2013-09-11-11-18-37/buildout-cache/eggs/mr.developer-1.26-py2.7.egg/mr/developer/git.py", line 226, in checkout return self.git_checkout(**kwargs) File "/home/zope/adria/rcse/production-2013-09-11-11-18-37/buildout-cache/eggs/mr.developer-1.26-py2.7.egg/mr/developer/git.py", line 135, in git_checkout stdout, stderr = self.git_switch_branch(stdout, stderr) File "/home/zope/adria/rcse/production-2013-09-11-11-18-37/buildout-cache/eggs/mr.developer-1.26-py2.7.egg/mr/developer/git.py", line 158, in git_switch_branch raise GitError("'git branch -a' failed.\n%s" % (branch, stderr)) TypeError: not all arguments converted during string formatting

toutpt avatar Sep 11 '13 10:09 toutpt

Yeah, the branch is irrelevant for the error message, so this is the fix:

raise GitError("'git branch -a' failed.\n%s" % stderr)

But I wonder how you got it to fail at that point.

fschulze avatar Sep 11 '13 13:09 fschulze

This is quite a weird context:

I'm currently try to use git's post-recieve hook (server side) which launch a shell script in background (using nohup script). When the script is launch by git it seems it delete the STDIN so mr.developer fails on some repository only. We have tried to set threads to 1 but it doesn't fix the issue.

To fix our issue we just change the way to trigger the build so now the post-recieve just create a file (touch) and a cron launch our build if a file exists.

toutpt avatar Sep 11 '13 13:09 toutpt