<div dir="ltr"><div>as a general rule, we have a set of __future__'s that we put at the top of every python source:<br><br>```<br>from __future__ import (absolute_import, division, print_function,<br>                        unicode_literals)<br>```<br><br></div>Now, whether or not this would fix your problem or not, I haven't a clue.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 8, 2017 at 1:49 PM, Jody Klymak <span dir="ltr"><<a href="mailto:jklymak@uvic.ca" target="_blank">jklymak@uvic.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>




<div>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Hi all,</p>

<p dir="auto">Very sorry to be ignorant, but my python 2.7 build of the <a href="https://github.com/matplotlib/matplotlib/pull/9082" target="_blank">constrained_layout manager</a> is failing because the underlying functions don’t accept unicode strings.  i.e. <code>boo(‘test’)</code> fails with a warning: <code>TypeError: Expected object of type</code>float, int, or long<code>. Got object of type unicode instead.</code>  OK, the warning is a little confused - strings get converted to floats inside this fcn, but you get the idea…</p>

<p dir="auto">Am I supposed to put <code># -*- coding: utf-8 -*-</code> at the top of every source that might create a string that calls these functions?  Or should I convert the string somehow in my wrappers before passing down?  Or does <code>from __future__ import unicode_literals</code> do this?</p>

<p dir="auto">Thanks for bearing with me,   Jody</p>
</div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>devel</a><br>
<br></blockquote></div><br></div>