mpastell / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.
http://mpastell.com/pweave
Other
435 stars 64 forks source link

pweave fails on example FIR_designp.pmd #121

Closed dilawar closed 6 years ago

dilawar commented 6 years ago
[dilawars@chamcham ReactionWithDiffD (master)]$ pweave --version
Pweave 0.30.2
[dilawars@chamcham ReactionWithDiffD (master)]$ pweave FIR_designp.pmd 
Processing chunk 1 named None from line 85
Processing chunk 2 named None from line 107
Traceback (most recent call last):
  File "/home1/dilawars/.local/bin/pweave", line 11, in <module>
    sys.exit(weave())
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/scripts.py", line 53, in weave
    pweave.weave(infile, **opts_dict)
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/__init__.py", line 59, in weave
    doc.weave()
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/pweb.py", line 192, in weave
    self.run()
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/pweb.py", line 129, in run
    proc.run()
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/processors/base.py", line 46, in run
    res = self._runcode(chunk)
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/processors/base.py", line 149, in _runcode
    sources, results = self.loadterm(chunk['content'], chunk=chunk)
  File "/home1/dilawars/.local/lib/python3.6/site-packages/pweave/processors/jupyter.py", line 189, in loadterm
    splitter.push_line(line)
AttributeError: 'IPythonInputSplitter' object has no attribute 'push_line'
[dilawars@chamcham ReactionWithDiffD (master)]$ 

Seems like something is not compatible with IPython. Same error when options -f md2html of -f pandoc is used.

piccolbo commented 6 years ago

Works for me. Maybe your python and ipython versions? Mine:

antonio@MacBook-Pro-4 ~/Downloads> pweave --version
Pweave 0.30.2
antonio@MacBook-Pro-4 ~/Downloads> python --version
Python 3.6.3 :: Anaconda custom (64-bit)
antonio@MacBook-Pro-4 ~/Downloads> ipython --version
6.1.0
dilawar commented 6 years ago

I see. Here is mine:

[dilawars@chamcham Downloads]$ python --version
Python 3.6.6
[dilawars@chamcham Downloads]$ ipython --version
6.3.1

I am on Arch Linux which usually have most recently released versions. I suspect that it is going to break with latest release of IPython.

piccolbo commented 6 years ago

You are right. I upgraded and I can reproduce the error (on OS X).

piccolbo commented 6 years ago

I created PR #122 seems to fix this, passes tests. @dilawar if you know how to build from source, please verify. @mpastell could you please review?

piccolbo commented 6 years ago

Actually fails on 3.4 because of a dependency issue. I don't think this change could have anything to deal with it.

dilawar commented 6 years ago

No longer getting the error message but seems to taking a long time.

[dilawars@chamcham ~]$ pip install git+https://github.com/piccolbo/Pweave --user 
$ [dilawars@chamcham Downloads]$ pweave FIR_designp.pmd 
Processing chunk 1 named None from line 85
Processing chunk 2 named None from line 107

^CProcessing chunk 3 named None from line 120
^CProcessing chunk 4 named None from line 131
^CWeaved FIR_designp.pmd to FIR_designp.html
[dilawars@chamcham Downloads]$ pweave -f md2html FIR_designp.pmd 
status
status
Processing chunk 1 named None from line 85
Processing chunk 2 named None from line 107

[... stuck here for more than 2 minutes ...]

Ctrl+C breaks but get stuck at chunk4. One more Ctrl+C, and it finishes.

Snippets from generated HTML.

---------------------------------------------------------------------------KeyboardInterrupt
Traceback (most recent call last)<ipython-input-1-11bfdf306b97> in <module>()
      1 n = 1001
      2 a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris',
pass_zero = False)
----> 3 mfreqz(a)
<ipython-
input-1-d556b261cb25> in mfreqz(b, a)
     19
title(r'Phase response')
     20     _
= subplots_adjust(hspace=1)
---> 21     show()
     22
     23 #Plot step and impulse response
/usr/lib/python3.6/site-
packages/matplotlib/pyplot.py in show(*args, **kw)
    251
"""
    252     global _show
--> 253     return _show(*args, **kw)
    254
    255
~/.local/lib/python3.6/site-
packages/ipykernel/pylab/backend_inline.py in show(close,
block)
     34     try:
     35
for figure_manager in Gcf.get_all_fig_managers():
---> 36             display(figure_manager.canvas.figure)
     37     finally:
     38
show._to_draw = []
/usr/lib/python3.6/site-
packages/IPython/core/display.py in display(include, exclude,
metadata, transient, display_id, *objs, **kwargs)
    296
publish_display_data(data=obj,
metadata=metadata, **kwargs)
    297
else:
--> 298             format_dict,
md_dict = format(obj, include=include, exclude=exclude)
    299
if not format_dict:
    300
# nothing to display (e.g. _ipython_display_
took over)
/usr/lib/python3.6/site-
packages/IPython/core/formatters.py in format(self, obj, include,
exclude)
    178
md = None
    179
try:
--> 180                 data =
formatter(obj)
    181
except:
    182
# FIXME: log the exception
<decorator-gen-9> in __call__(self,
obj)
/usr/lib/python3.6/site-
packages/IPython/core/formatters.py in catch_format_error(method, self,
*args, **kwargs)
    222     """show traceback on failed format
call"""
    223     try:
--> 224         r = method(self,
*args, **kwargs)
    225     except NotImplementedError:
    226
# don't warn on
NotImplementedErrors
/usr/lib/python3.6/site-
packages/IPython/core/formatters.py in __call__(self, obj)
    339
pass
    340
else:
--> 341                 return
printer(obj)
    342
# Finally look for special method
names
    343
method = get_real_method(obj,
self.print_method)
/usr/lib/python3.6/site-
packages/IPython/core/pylabtools.py in <lambda>(fig)
    245
jpg_formatter.for_type(Figure,
lambda fig: print_figure(fig, 'jpg', **kwargs))
    246     if 'svg' in
formats:
--> 247         svg_formatter.for_type(Figure, lambda fig:
print_figure(fig, 'svg', **kwargs))
    248     if 'pdf' in
formats:
    249
pdf_formatter.for_type(Figure,
lambda fig: print_figure(fig, 'pdf', **kwargs))
/usr/lib/python3.6/site-
packages/IPython/core/pylabtools.py in print_figure(fig, fmt,
bbox_inches, **kwargs)
    123
    124
bytes_io = BytesIO()
--> 125     fig.canvas.print_figure(bytes_io, **kw)
    126     data
= bytes_io.getvalue()
    127     if fmt == 'svg':
/usr/lib/python3.6/site-
packages/matplotlib/backend_bases.py in print_figure(self, filename,
dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210
orientation=orientation,
   2211
dryrun=True,
-> 2212                     **kwargs)
   2213
renderer = self.figure._cachedRenderer
   2214
bbox_inches = self.figure.get_tightbbox(renderer)
/usr/lib/python3.6/site-
packages/matplotlib/backends/backend_svg.py in print_svg(self,
filename, *args, **kwargs)
   1208
detach = True
   1209
-> 1210             result =
self._print_svg(filename, fh, **kwargs)
   1211
   1212
# Detach underlying stream from wrapper so
that it remains open in
/usr/lib/python3.6/site-
packages/matplotlib/backends/backend_svg.py in _print_svg(self, filename, fh, **kwargs)
   1238
bbox_inches_restore=_bbox_inches_restore)
   1239
-> 1240         self.figure.draw(renderer)
   1241
renderer.finalize()
   1242
/usr/lib/python3.6/site-
packages/matplotlib/artist.py in draw_wrapper(artist, renderer,
*args, **kwargs)
     53
renderer.start_filter()
     54
---> 55             return
draw(artist, renderer, *args,
**kwargs)
     56
finally:
     57
if artist.get_agg_filter() is
not None:
/usr/lib/python3.6/site-
packages/matplotlib/figure.py in draw(self, renderer)
   1473
   1474
mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476
   1477
renderer.close_group('figure')
/usr/lib/python3.6/site-
packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140
for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143
# Composite any adjacent images
together
/usr/lib/python3.6/site-
packages/matplotlib/artist.py in draw_wrapper(artist, renderer,
*args, **kwargs)
     53
renderer.start_filter()
     54
---> 55             return
draw(artist, renderer, *args,
**kwargs)
     56
finally:
     57
if artist.get_agg_filter() is
not None:
/usr/lib/python3.6/site-
packages/matplotlib/axes/_base.py in draw(self, renderer,
inframe)
   2605
renderer.stop_rasterizing()
   2606
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608
   2609
renderer.close_group('axes')
/usr/lib/python3.6/site-
packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140
for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143
# Composite any adjacent images
together
/usr/lib/python3.6/site-
packages/matplotlib/artist.py in draw_wrapper(artist, renderer,
*args, **kwargs)
     53
renderer.start_filter()
     54
---> 55             return
draw(artist, renderer, *args,
**kwargs)
     56
finally:
     57
if artist.get_agg_filter() is
not None:
/usr/lib/python3.6/site-
packages/matplotlib/text.py in draw(self, renderer)
    749
textrenderer.draw_tex(gc, x, y, clean_line,
    750
textobj._fontproperties, angle,
--> 751                                           mtext=mtext)
    752
else:
    753
textrenderer.draw_text(gc, x, y, clean_line,
/usr/lib/python3.6/site-
packages/matplotlib/backends/backend_svg.py in draw_tex(self,
gc, x, y, s, prop, angle, ismath, mtext)
   1152
   1153     def draw_tex(self, gc, x,
y, s, prop, angle, ismath='TeX!', mtext=None):
-> 1154         self._draw_text_as_path(gc, x, y, s, prop,
angle, ismath="TeX")
   1155
   1156     def draw_text(self, gc, x,
y, s, prop, angle, ismath=False, mtext=None):
/usr/lib/python3.6/site-
packages/matplotlib/backends/backend_svg.py in _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath, mtext)
    952
if ismath == "TeX":
    953
_glyphs = text2path.get_glyphs_tex(prop, s, glyph_map=glyph_map,
--> 954
return_new_glyphs_only=True)
    955
else:
    956
_glyphs = text2path.get_glyphs_mathtext(prop, s, glyph_map=glyph_map,
/usr/lib/python3.6/site-
packages/matplotlib/textpath.py in get_glyphs_tex(self, prop, s,
glyph_map, return_new_glyphs_only)
    333
for x1, y1, dvifont, glyph,
width in page.text:
    334
font_and_encoding = self._ps_fontd.get(dvifont.texname)
--> 335             font_bunch =
self.tex_font_map[dvifont.texname]
    336
    337
if font_and_encoding is None:
/usr/lib/python3.6/site-
packages/matplotlib/dviread.py in __getitem__(self,
texname)
    864
fn = find_tex_file(fn)
    865
if enc is not None and not enc.startswith(b'/'):
--> 866             enc =
find_tex_file(result.encoding)
    867
return result._replace(filename=fn, encoding=enc)
    868
/usr/lib/python3.6/site-
packages/matplotlib/dviread.py in find_tex_file(filename,
format)
   1044     pipe
= subprocess.Popen(cmd, stdout=subprocess.PIPE,
   1045
stderr=subprocess.PIPE)
-> 1046     result = pipe.communicate()[0].rstrip()
   1047
_log.debug('find_tex_file result:
%s', result)
   1048     return result.decode('ascii')
/usr/lib/python3.6/subprocess.py in
communicate(self, input, timeout)
    841
    842
try:
--> 843                 stdout,
stderr = self._communicate(input, endtime, timeout)
    844
finally:
    845
self._communication_started = True
/usr/lib/python3.6/subprocess.py in
_communicate(self, input, endtime, orig_timeout)
   1512
raise TimeoutExpired(self.args, orig_timeout)
   1513
-> 1514                     ready = selector.select(timeout)
   1515
self._check_timeout(endtime, orig_timeout)
   1516
/usr/lib/python3.6/selectors.py in
select(self, timeout)
    374
ready = []
    375
try:
--> 376                 fd_event_list = self._poll.poll(timeout)
    377
except InterruptedError:
    378
return ready
KeyboardInterrupt:
piccolbo commented 6 years ago

Both are reasonably fast for me, ~ 5 and 7s. Not sure what to think.

On Mon, Jul 16, 2018 at 11:14 PM Dilawar Singh notifications@github.com wrote:

No longer getting the error message but seems to taking a long time.

[dilawars@chamcham ~]$ pip install git+https://github.com/piccolbo/Pweave --user $ [dilawars@chamcham Downloads]$ pweave FIR_designp.pmd Processing chunk 1 named None from line 85 Processing chunk 2 named None from line 107

^CProcessing chunk 3 named None from line 120 ^CProcessing chunk 4 named None from line 131 ^CWeaved FIR_designp.pmd to FIR_designp.html [dilawars@chamcham Downloads]$ pweave -f md2html FIR_designp.pmd status status Processing chunk 1 named None from line 85 Processing chunk 2 named None from line 107

[... stuck here for more than 2 minutes ...]

Ctrl+C breaks but get stuck at chunk4. One more Ctrl+C, and it finishes.

Snippets from generated HTML.

---------------------------------------------------------------------------KeyboardInterrupt Traceback (most recent call last) in () 1 n = 1001 2 a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', passzero = False) ----> 3 mfreqz(a) <ipython- input-1-d556b261cb25> in mfreqz(b, a) 19 title(r'Phase response') 20 = subplots_adjust(hspace=1) ---> 21 show() 22 23 #Plot step and impulse response /usr/lib/python3.6/site- packages/matplotlib/pyplot.py in show(*args, kw) 251 """ 252 global _show --> 253 return _show(*args, *kw) 254 255 ~/.local/lib/python3.6/site- packages/ipykernel/pylab/backend_inline.py in show(close, block) 34 try: 35 for figure_manager in Gcf.get_all_fig_managers(): ---> 36 display(figure_manager.canvas.figure) 37 finally: 38 show._to_draw = [] /usr/lib/python3.6/site- packages/IPython/core/display.py in display(include, exclude, metadata, transient, display_id, objs, kwargs) 296 publish_display_data(data=obj, metadata=metadata, **kwargs) 297 else: --> 298 format_dict, md_dict = format(obj, include=include, exclude=exclude) 299 if not format_dict: 300

nothing to display (e.g. _ipythondisplay

took over) /usr/lib/python3.6/site- packages/IPython/core/formatters.py in format(self, obj, include, exclude) 178 md = None 179 try: --> 180 data = formatter(obj) 181 except: 182

FIXME: log the exception

in __call__(self, obj) /usr/lib/python3.6/site- packages/IPython/core/formatters.py in catch_format_error(method, self, *args, **kwargs) 222 """show traceback on failed format call""" 223 try: --> 224 r = method(self, *args, **kwargs) 225 except NotImplementedError: 226 # don't warn on NotImplementedErrors /usr/lib/python3.6/site- packages/IPython/core/formatters.py in __call__(self, obj) 339 pass 340 else: --> 341 return printer(obj) 342 # Finally look for special method names 343 method = get_real_method(obj, self.print_method) /usr/lib/python3.6/site- packages/IPython/core/pylabtools.py in (fig) 245 jpg_formatter.for_type(Figure, lambda fig: print_figure(fig, 'jpg', **kwargs)) 246 if 'svg' in formats: --> 247 svg_formatter.for_type(Figure, lambda fig: print_figure(fig, 'svg', **kwargs)) 248 if 'pdf' in formats: 249 pdf_formatter.for_type(Figure, lambda fig: print_figure(fig, 'pdf', **kwargs)) /usr/lib/python3.6/site- packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs) 123 124 bytes_io = BytesIO() --> 125 fig.canvas.print_figure(bytes_io, **kw) 126 data = bytes_io.getvalue() 127 if fmt == 'svg': /usr/lib/python3.6/site- packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2210 orientation=orientation, 2211 dryrun=True, -> 2212 **kwargs) 2213 renderer = self.figure._cachedRenderer 2214 bbox_inches = self.figure.get_tightbbox(renderer) /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in print_svg(self, filename, *args, **kwargs) 1208 detach = True 1209 -> 1210 result = self._print_svg(filename, fh, **kwargs) 1211 1212 # Detach underlying stream from wrapper so that it remains open in /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in _print_svg(self, filename, fh, **kwargs) 1238 bbox_inches_restore=_bbox_inches_restore) 1239 -> 1240 self.figure.draw(renderer) 1241 renderer.finalize() 1242 /usr/lib/python3.6/site- packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: /usr/lib/python3.6/site- packages/matplotlib/figure.py in draw(self, renderer) 1473 1474 mimage._draw_list_compositing_images( -> 1475 renderer, self, artists, self.suppressComposite) 1476 1477 renderer.close_group('figure') /usr/lib/python3.6/site- packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together /usr/lib/python3.6/site- packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: /usr/lib/python3.6/site- packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2605 renderer.stop_rasterizing() 2606 -> 2607 mimage._draw_list_compositing_images(renderer, self, artists) 2608 2609 renderer.close_group('axes') /usr/lib/python3.6/site- packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together /usr/lib/python3.6/site- packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: /usr/lib/python3.6/site- packages/matplotlib/text.py in draw(self, renderer) 749 textrenderer.draw_tex(gc, x, y, clean_line, 750 textobj._fontproperties, angle, --> 751 mtext=mtext) 752 else: 753 textrenderer.draw_text(gc, x, y, clean_line, /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in draw_tex(self, gc, x, y, s, prop, angle, ismath, mtext) 1152 1153 def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!', mtext=None): -> 1154 self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX") 1155 1156 def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath, mtext) 952 if ismath == "TeX": 953 _glyphs = text2path.get_glyphs_tex(prop, s, glyph_map=glyph_map, --> 954 return_new_glyphs_only=True) 955 else: 956 _glyphs = text2path.get_glyphs_mathtext(prop, s, glyph_map=glyph_map, /usr/lib/python3.6/site- packages/matplotlib/textpath.py in get_glyphs_tex(self, prop, s, glyph_map, return_new_glyphs_only) 333 for x1, y1, dvifont, glyph, width in page.text: 334 font_and_encoding = self._ps_fontd.get(dvifont.texname) --> 335 font_bunch = self.tex_font_map[dvifont.texname] 336 337 if font_and_encoding is None: /usr/lib/python3.6/site- packages/matplotlib/dviread.py in __getitem__(self, texname) 864 fn = find_tex_file(fn) 865 if enc is not None and not enc.startswith(b'/'): --> 866 enc = find_tex_file(result.encoding) 867 return result._replace(filename=fn, encoding=enc) 868 /usr/lib/python3.6/site- packages/matplotlib/dviread.py in find_tex_file(filename, format) 1044 pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, 1045 stderr=subprocess.PIPE) -> 1046 result = pipe.communicate()[0].rstrip() 1047 _log.debug('find_tex_file result: %s', result) 1048 return result.decode('ascii') /usr/lib/python3.6/subprocess.py in communicate(self, input, timeout) 841 842 try: --> 843 stdout, stderr = self._communicate(input, endtime, timeout) 844 finally: 845 self._communication_started = True /usr/lib/python3.6/subprocess.py in _communicate(self, input, endtime, orig_timeout) 1512 raise TimeoutExpired(self.args, orig_timeout) 1513 -> 1514 ready = selector.select(timeout) 1515 self._check_timeout(endtime, orig_timeout) 1516 /usr/lib/python3.6/selectors.py in select(self, timeout) 374 ready = [] 375 try: --> 376 fd_event_list = self._poll.poll(timeout) 377 except InterruptedError: 378 return ready KeyboardInterrupt: — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .
dilawar commented 6 years ago

Probably just a matplotlib setup issue on my machine. I think you can close this ticket since the major issue is resolved by PR.

I'll check with virtualenv and update this ticket.

On Tue, Jul 17, 2018 at 11:49 AM, Antonio Piccolboni < notifications@github.com> wrote:

Both are reasonably fast for me, ~ 5 and 7s. Not sure what to think.

On Mon, Jul 16, 2018 at 11:14 PM Dilawar Singh notifications@github.com wrote:

No longer getting the error message but seems to taking a long time.

[dilawars@chamcham ~]$ pip install git+https://github.com/ piccolbo/Pweave --user $ [dilawars@chamcham Downloads]$ pweave FIR_designp.pmd Processing chunk 1 named None from line 85 Processing chunk 2 named None from line 107

^CProcessing chunk 3 named None from line 120 ^CProcessing chunk 4 named None from line 131 ^CWeaved FIR_designp.pmd to FIR_designp.html [dilawars@chamcham Downloads]$ pweave -f md2html FIR_designp.pmd status status Processing chunk 1 named None from line 85 Processing chunk 2 named None from line 107

[... stuck here for more than 2 minutes ...]

Ctrl+C breaks but get stuck at chunk4. One more Ctrl+C, and it finishes.

Snippets from generated HTML.


---------------KeyboardInterrupt Traceback (most recent call last) in

() 1 n = 1001 2 a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', pass_zero = False) ----> 3 mfreqz(a) in mfreqz(b, a) 19 title(r'Phase response') 20 _ = subplots_adjust(hspace=1) ---> 21 show() 22 23 #Plot step and impulse response /usr/lib/python3.6/site- packages/matplotlib/pyplot.py in show(*args, **kw) 251 """ 252 global _show --> 253 return _show(*args, **kw) 254 255 ~/.local/lib/python3.6/site- packages/ipykernel/pylab/backend_inline.py in show(close, block) 34 try: 35 for figure_manager in Gcf.get_all_fig_managers(): ---> 36 display(figure_manager.canvas.figure) 37 finally: 38 show._to_draw = [] /usr/lib/python3.6/site- packages/IPython/core/display.py in display(include, exclude, metadata, transient, display_id, *objs, **kwargs) 296 publish_display_data(data=obj, metadata=metadata, **kwargs) 297 else: --> 298 format_dict, md_dict = format(obj, include=include, exclude=exclude) 299 if not format_dict: 300 # nothing to display (e.g. _ipython_display_ took over) /usr/lib/python3.6/site- packages/IPython/core/formatters.py in format(self, obj, include, exclude) 178 md = None 179 try: --> 180 data = formatter(obj) 181 except: 182 # FIXME: log the exception in __call__(self, obj) /usr/lib/python3.6/site- packages/IPython/core/formatters.py in catch_format_error(method, self, *args, **kwargs) 222 """show traceback on failed format call""" 223 try: --> 224 r = method(self, *args, **kwargs) 225 except NotImplementedError: 226 # don't warn on NotImplementedErrors /usr/lib/python3.6/site- packages/IPython/core/formatters.py in __call__(self, obj) 339 pass 340 else: --> 341 return printer(obj) 342 # Finally look for special method names 343 method = get_real_method(obj, self.print_method) /usr/lib/python3.6/site- packages/IPython/core/pylabtools.py in (fig) 245 jpg_formatter.for_type(Figure, lambda fig: print_figure(fig, 'jpg', **kwargs)) 246 if 'svg' in formats: --> 247 svg_formatter.for_type(Figure, lambda fig: print_figure(fig, 'svg', **kwargs)) 248 if 'pdf' in formats: 249 pdf_formatter.for_type(Figure, lambda fig: print_figure(fig, 'pdf', **kwargs)) /usr/lib/python3.6/site- packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs) 123 124 bytes_io = BytesIO() --> 125 fig.canvas.print_figure(bytes_io, **kw) 126 data = bytes_io.getvalue() 127 if fmt == 'svg': /usr/lib/python3.6/site- packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2210 orientation=orientation, 2211 dryrun=True, -> 2212 **kwargs) 2213 renderer = self.figure._cachedRenderer 2214 bbox_inches = self.figure.get_tightbbox(renderer) /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in print_svg(self, filename, *args, **kwargs) 1208 detach = True 1209 -> 1210 result = self._print_svg(filename, fh, **kwargs) 1211 1212 # Detach underlying stream from wrapper so that it remains open in /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in _print_svg(self, filename, fh, **kwargs) 1238 bbox_inches_restore=_bbox_inches_restore) 1239 -> 1240 self.figure.draw(renderer) 1241 renderer.finalize() 1242 /usr/lib/python3.6/site- packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: /usr/lib/python3.6/site- packages/matplotlib/figure.py in draw(self, renderer) 1473 1474 mimage._draw_list_compositing_images( -> 1475 renderer, self, artists, self.suppressComposite) 1476 1477 renderer.close_group('figure') /usr/lib/python3.6/site- packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together /usr/lib/python3.6/site- packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: /usr/lib/python3.6/site- packages/matplotlib/axes/_base.py in draw(self, renderer, inframe) 2605 renderer.stop_rasterizing() 2606 -> 2607 mimage._draw_list_compositing_images(renderer, self, artists) 2608 2609 renderer.close_group('axes') /usr/lib/python3.6/site- packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 139 if not_composite or not has_images: 140 for a in artists: --> 141 a.draw(renderer) 142 else: 143 # Composite any adjacent images together /usr/lib/python3.6/site- packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: /usr/lib/python3.6/site- packages/matplotlib/text.py in draw(self, renderer) 749 textrenderer.draw_tex(gc, x, y, clean_line, 750 textobj._fontproperties, angle, --> 751 mtext=mtext) 752 else: 753 textrenderer.draw_text(gc, x, y, clean_line, /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in draw_tex(self, gc, x, y, s, prop, angle, ismath, mtext) 1152 1153 def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!', mtext=None): -> 1154 self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX") 1155 1156 def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): /usr/lib/python3.6/site- packages/matplotlib/backends/backend_svg.py in _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath, mtext) 952 if ismath == "TeX": 953 _glyphs = text2path.get_glyphs_tex(prop, s, glyph_map=glyph_map, --> 954 return_new_glyphs_only=True) 955 else: 956 _glyphs = text2path.get_glyphs_mathtext(prop, s, glyph_map=glyph_map, /usr/lib/python3.6/site- packages/matplotlib/textpath.py in get_glyphs_tex(self, prop, s, glyph_map, return_new_glyphs_only) 333 for x1, y1, dvifont, glyph, width in page.text: 334 font_and_encoding = self._ps_fontd.get(dvifont.texname) --> 335 font_bunch = self.tex_font_map[dvifont.texname] 336 337 if font_and_encoding is None: /usr/lib/python3.6/site- packages/matplotlib/dviread.py in __getitem__(self, texname) 864 fn = find_tex_file(fn) 865 if enc is not None and not enc.startswith(b'/'): --> 866 enc = find_tex_file(result.encoding) 867 return result._replace(filename=fn, encoding=enc) 868 /usr/lib/python3.6/site- packages/matplotlib/dviread.py in find_tex_file(filename, format) 1044 pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, 1045 stderr=subprocess.PIPE) -> 1046 result = pipe.communicate()[0].rstrip() 1047 _log.debug('find_tex_file result: %s', result) 1048 return result.decode('ascii') /usr/lib/python3.6/subprocess.py in communicate(self, input, timeout) 841 842 try: --> 843 stdout, stderr = self._communicate(input, endtime, timeout) 844 finally: 845 self._communication_started = True /usr/lib/python3.6/subprocess.py in _communicate(self, input, endtime, orig_timeout) 1512 raise TimeoutExpired(self.args, orig_timeout) 1513 -> 1514 ready = selector.select(timeout) 1515 self._check_timeout(endtime, orig_timeout) 1516 /usr/lib/python3.6/selectors.py in select(self, timeout) 374 ready = [] 375 try: --> 376 fd_event_list = self._poll.poll(timeout) 377 except InterruptedError: 378 return ready KeyboardInterrupt: — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mpastell/Pweave/issues/121#issuecomment-405472373, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2qwU1zz_szOYuinRm-Qm659_9699SWks5uHYHlgaJpZM4VQmKj .

-- Dilawar NCBS Bangalore

piccolbo commented 6 years ago

Thanks for your comments and in case it isn't clear I am not a committer so we'll have to wait for @mpastell to take a look and ticket will be closed automatically upon merge, I believe.

mpastell commented 6 years ago

I just pushed a new release with a fix to pypi and will update the conda-forge recipe shortly. Thanks for reporting and investigating the bug!