Issue 1:
Bug report

Bug summary

I have a pcolormesh that has shading='gouraud', and I am trying to save it to an .eps. Saving it to a pdf works fine, but trying to save to an eps gives an error.

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
plt.pcolormesh(np.random.randn(10,10), shading='gouraud')
plt.gcf().savefig('test.eps')

Actual outcome

168 def quote_ps_string(s):
169 "Quote dangerous characters of S for use in a PostScript string constant."
--> 170 s=s.replace("\\", "\\\\")
171 s=s.replace("(", "\\(")
172 s=s.replace(")", "\\)")

TypeError: a bytes-like object is required, not 'str'

Matplotlib version

matplotlib 1.5.1

'3.5.1 |Anaconda 2.4.1 (x86_64)| (default, Dec 7 2015, 11:24:55) \n[GCC 4.2.1 (Apple Inc. build 5577)]'

OS X

I fixing this might just require adding a 'b' before these strings.

Issue 2:
I'm running python 3.4 on Debian 8.3, and am using the Qt5Agg backend. When I call savefig() or use the toolbar widget to save a figure that has a gouraud shaded triangulation, I get the following stacktrace:

Traceback (most recent call last):
File "/home/tps/PyCharmProjects/test/test_PlotWindow.py", line 323, in saveFigRButtonClicked
savefig(fname)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/pyplot.py", line 688, in savefig
res = fig.savefig(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/figure.py", line 1565, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_qt5agg.py", line 196, in print_figure
FigureCanvasAgg.print_figure(self, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backend_bases.py", line 2232, in print_figure
**kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py", line 995, in print_eps
return self._print_ps(outfile, 'eps', *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py", line 1023, in _print_ps
**kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py", line 1113, in _print_figure
self.figure.draw(renderer)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/figure.py", line 1159, in draw
func(*args)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/axes/_base.py", line 2324, in draw
a.draw(renderer)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/matplotlib/collections.py", line 1694, in draw
renderer.draw_gouraud_triangles(gc, verts, colors, transform.frozen())
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py", line 867, in draw_gouraud_triangles
stream = quote_ps_string(streamarr.tostring())
File "/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_ps.py", line 170, in quote_ps_string
s=s.replace("\\", "\\\\")
TypeError: expected bytes, bytearray or buffer compatible object