[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

mailer.py commit says TypeError: must be unicode, not str

From: Kenneth Porter <shiva_at_sewingwitch.com>
Date: Tue, 23 Jan 2018 07:14:47 -0800

I upgraded my repo server from CentOS 6 to 7 and my commit hook is now
failing with this message. I manually upgraded mailer.py from that found
in Subversion 1.7.14 to the latest in trunk and still get the same
error. So I suspect it's something in the Subversion Python bindings and
not the mailer script. Or do I need to upgrade my repo through a dump
and reload? (Repo format is 3.)

Here's the full traceback. I do get the email.

bash-4.2$ /usr/local/bin/subversion/mailer.py commit /srv/svn/MPA 7598
/usr/local/bin/subversion/mailer.conf
Traceback (most recent call last):
   File "/usr/local/bin/subversion/mailer.py", line 1465, in <module>
     sys.argv[3:3+expected_args])
   File "/usr/lib64/python2.7/site-packages/svn/core.py", line 307, in
run_app
     return func(application_pool, *args, **kw)
   File "/usr/local/bin/subversion/mailer.py", line 132, in main
     messenger.generate()
   File "/usr/local/bin/subversion/mailer.py", line 439, in generate
     group, params, paths, subpool)
   File "/usr/local/bin/subversion/mailer.py", line 709, in generate_content
     renderer.render(data)
   File "/usr/local/bin/subversion/mailer.py", line 1056, in render
     self._render_diffs(data.diffs, '')
   File "/usr/local/bin/subversion/mailer.py", line 1099, in _render_diffs
     for diff in diffs:
   File "/usr/local/bin/subversion/mailer.py", line 898, in __getitem__
     src_fname, dst_fname = diff.get_files()
   File "/usr/lib64/python2.7/site-packages/svn/fs.py", line 103, in
get_files
     self._dump_contents(self.tempfile2, self.root2, self.path2)
   File "/usr/lib64/python2.7/site-packages/svn/fs.py", line 87, in
_dump_contents
     fp.write(chunk)
TypeError: must be unicode, not str
Received on 2018-01-23 16:16:38 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.