Pastebin

Paste #5421: 2544_backtrace

< previous paste - next paste>

Pasted by Alex Lindsay

Download View as text

ValueError                                Traceback (most recent call last)
<ipython-input-1-7b27ada13ca6> in <module>()
     20 # Override matplotlib's defaults to get a nicer looking font
     21 with rc_context({'mathtext.fontset': 'stix'}):
---> 22     animation.save('animation.mp4')

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs)
   1011                         # TODO: See if turning off blit is really necessary
   1012                         anim._draw_next_frame(d, blit=False)
-> 1013                     writer.grab_frame(**savefig_kwargs)
   1014 
   1015         # Reconnect signal for first draw if necessary

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/contextlib.py in __exit__(self, type, value, traceback)
     75                 value = type()
     76             try:
---> 77                 self.gen.throw(type, value, traceback)
     78                 raise RuntimeError("generator didn't stop after throw()")
     79             except StopIteration as exc:

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/site-packages/matplotlib/animation.py in saving(self, *args, **kw)
    254             yield self
    255         finally:
--> 256             self.finish()
    257 
    258     def _run(self):

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/site-packages/matplotlib/animation.py in finish(self)
    274     def finish(self):
    275         'Finish any processing for writing the movie.'
--> 276         self.cleanup()
    277 
    278     def grab_frame(self, **savefig_kwargs):

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/site-packages/matplotlib/animation.py in cleanup(self)
    309     def cleanup(self):
    310         'Clean-up and collect the process used to write the movie file.'
--> 311         out, err = self._proc.communicate()
    312         self._frame_sink().close()
    313         verbose.report('MovieWriter -- '

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/subprocess.py in communicate(self, input, timeout)
   1070 
   1071             try:
-> 1072                 stdout, stderr = self._communicate(input, endtime, timeout)
   1073             finally:
   1074                 self._communication_started = True

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/subprocess.py in _communicate(self, input, endtime, orig_timeout)
   1704                     selector.register(self.stdin, selectors.EVENT_WRITE)
   1705                 if self.stdout:
-> 1706                     selector.register(self.stdout, selectors.EVENT_READ)
   1707                 if self.stderr:
   1708                     selector.register(self.stderr, selectors.EVENT_READ)

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/selectors.py in register(self, fileobj, events, data)
    349 
    350         def register(self, fileobj, events, data=None):
--> 351             key = super().register(fileobj, events, data)
    352             poll_events = 0
    353             if events & EVENT_READ:

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/selectors.py in register(self, fileobj, events, data)
    235             raise ValueError("Invalid events: {!r}".format(events))
    236 
--> 237         key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
    238 
    239         if key.fd in self._fd_to_key:

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/selectors.py in _fileobj_lookup(self, fileobj)
    222         """
    223         try:
--> 224             return _fileobj_to_fd(fileobj)
    225         except ValueError:
    226             # Do an exhaustive search.

/home/lindsayad/miniconda2/envs/yt-devel/lib/python3.5/selectors.py in _fileobj_to_fd(fileobj)
     37         except (AttributeError, TypeError, ValueError):
     38             raise ValueError("Invalid file object: "
---> 39                              "{!r}".format(fileobj)) from None
     40     if fd < 0:
     41         raise ValueError("Invalid file descriptor: {}".format(fd))

ValueError: Invalid file object: <_io.BufferedReader name=70>

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.