I have a project being built with Pybuilder.  I cloned it onto a new computer, and when I ran pyb, my unit tests complained that there was no module named xmlrunner.  So after I did pip install xmlrunner, I get a build error from Pybuilder that:
'unicode' object has no attribute 'write'.
If I remove my unit tests from the unittest search path, the build completes successfully.  When I run the unit tests directly, they complete successfully.  So I'm thinking that somehow XMLRunner is failing.  Pip installed XMLRunner version 1.7.7.  Thanks in advance for your help.
I seemed to have got this working by doing the following:
First I got the same error as you:

BUILD FAILED - 'unicode' object has no attribute 'write'

Then I uninstalled xmlrunner & unittest-xml-reporting using pip
Then I used pyb install_dependencies which reinstalls unittest-xml-reporting
Then my unit tests start running again when I use pyb:

There were 1 error(s) and 0 failure(s) in unit tests

This is my current pip list output:

pip (7.1.2)
PyBuilder (0.11.1) 
setuptools (18.2) 
six (1.9.0) 
tblib (1.1.0) 
unittest-xml-reporting (1.12.0) 
wheel (0.24.0)

If you are using virtualenv, you can also get this error when you have pybuilder installed outside of your virtualenv environment:

For example, your virtualenv does not have pybuilder installed, but you can still run pyb from command line. It is this pybuilder that needs to be removed as well (I am on OSX so it was the default python that came with it)
XMLRunner - "unicode object has no attribute 'write'" when building