Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitError, TypeError: not all arguments converted during string formatting #124

Open
toutpt opened this issue Sep 11, 2013 · 2 comments
Open

Comments

@toutpt
Copy link

toutpt commented Sep 11, 2013

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

@fschulze
Copy link
Owner

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.

@toutpt
Copy link
Author

toutpt commented Sep 11, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants