[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
Traceback (most recent call last):
   File "/usr/local/bin/subversion/mailer.py", line 1465, in <module>
   File "/usr/lib64/python2.7/site-packages/svn/core.py", line 307, in
     return func(application_pool, *args, **kw)
   File "/usr/local/bin/subversion/mailer.py", line 132, in main
   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
   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
     self._dump_contents(self.tempfile2, self.root2, self.path2)
   File "/usr/lib64/python2.7/site-packages/svn/fs.py", line 87, in
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.