Jeff Klukas <klu...@wisc.edu> writes:

>   File 
> "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/matplotlib/dviread.py",
> line 727, in _register
>     assert encoding is None
> AssertionError

This sounds like this issue:
https://github.com/matplotlib/matplotlib/issues/191

There is a workaround in git commit 708c451 (patch below), which you
could apply to your local copy of dviread.

diff --git a/lib/matplotlib/dviread.py b/lib/matplotlib/dviread.py
index 5843a3c..7aca0ed 100644
--- a/lib/matplotlib/dviread.py
+++ b/lib/matplotlib/dviread.py
@@ -714,22 +714,30 @@ class PsfontsMap(object):
         subsetting, but I have no example of << in my TeX installation.
         """
         texname, psname = words[:2]
-        effects, encoding, filename = '', None, None
+        effects, encodings, filename = '', [], None
         for word in words[2:]:
             if not word.startswith('<'):
                 effects = word
             else:
                 word = word.lstrip('<')
                 if word.startswith('['):
-                    assert encoding is None
-                    encoding = word[1:]
+                    encodings.append(word[1:])
                 elif word.endswith('.enc'):
-                    assert encoding is None
-                    encoding = word
+                    encodings.append(word)
                 else:
                     assert filename is None
                     filename = word
 
+        if len(encodings) > 1:
+            # TODO this is a stopgap workaround, need to handle this correctly
+            matplotlib.verbose.report('Multiple encodings for %s = %s, skipping'
+                                      % (texname, psname), 'debug')
+            return
+        elif len(encodings) == 1:
+            encoding, = encodings
+        else:
+            encoding = None
+
         eff = effects.split()
         effects = {}
         try:
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to