cbook.report_memory IOError

Hi!

I have just run an old code that I believe was working before on OSX.
I am trying this with matplotlib 1.2.1 on an OSX EPD running Python 2.7.3

In [1]: from matplotlib.pylab import *

In [2]: import matplotlib.cbook as cbook

In [3]: data = ones((1500,1500,3))

In [4]: imshow(data)
Out[4]: <matplotlib.image.AxesImage at 0x109d343d0>

In [5]: ax = gca()

In [6]: print cbook.report_memory()

···

---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-6-88a73a5ab996> in <module>()
----> 1 print cbook.report_memory()

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py in report_memory(i)
   1210 elif sys.platform.startswith('darwin'):
   1211 a2 = Popen('ps -p %d -o rss,vsz' % pid, shell=True,
-> 1212 stdout=PIPE).stdout.readlines()
   1213 mem = int(a2[1].split()[0])
   1214 elif sys.platform.startswith('win'):

IOError: [Errno 4] Interrupted system call

First I thought, maybe this doesn't run in IPython for a reason, but trying it as a script also fails:

(general_dev+)[maye@...4404... ~/Dropbox/src/pymars]$ python imshow_test.py
Traceback (most recent call last):
  File "imshow_test.py", line 7, in <module>
    print cbook.report_memory()
  File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py", line 1212, in report_memory
    stdout=PIPE).stdout.readlines()
IOError: [Errno 4] Interrupted system call

Is this cbook recipe maybe broken?

Best,
Michael

Hi!

I have just run an old code that I believe was working before on OSX.
I am trying this with matplotlib 1.2.1 on an OSX EPD running Python 2.7.3

It works for me with OSX Mountain Lion and mpl 1.2.1 compiled from source. I don't think this is fundamentally a problem with cbook.report_memory.

Eric

···

On 2013/07/16 5:50 PM, K.-Michael Aye wrote:

In [1]: from matplotlib.pylab import *

In [2]: import matplotlib.cbook as cbook

In [3]: data = ones((1500,1500,3))

In [4]: imshow(data)
Out[4]: <matplotlib.image.AxesImage at 0x109d343d0>

In [5]: ax = gca()

In [6]: print cbook.report_memory()
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-6-88a73a5ab996> in <module>()
----> 1 print cbook.report_memory()

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py
in report_memory(i)
    1210 elif sys.platform.startswith('darwin'):
    1211 a2 = Popen('ps -p %d -o rss,vsz' % pid, shell=True,
-> 1212 stdout=PIPE).stdout.readlines()
    1213 mem = int(a2[1].split()[0])
    1214 elif sys.platform.startswith('win'):

IOError: [Errno 4] Interrupted system call

First I thought, maybe this doesn't run in IPython for a reason, but
trying it as a script also fails:

(general_dev+)[maye@...4404... ~/Dropbox/src/pymars]$ python imshow_test.py
Traceback (most recent call last):
   File "imshow_test.py", line 7, in <module>
     print cbook.report_memory()
   File
"/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py",
line 1212, in report_memory
     stdout=PIPE).stdout.readlines()
IOError: [Errno 4] Interrupted system call

Is this cbook recipe maybe broken?

Best,
Michael

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

To debug, it might be helpful to try

ps -p PID -o rss,vsz

(where PID is the process id of an interesting process)

and see what happens.

Mike

···

On 07/17/2013 02:05 AM, Eric Firing wrote:

On 2013/07/16 5:50 PM, K.-Michael Aye wrote:

Hi!

I have just run an old code that I believe was working before on OSX.
I am trying this with matplotlib 1.2.1 on an OSX EPD running Python 2.7.3

It works for me with OSX Mountain Lion and mpl 1.2.1 compiled from
source. I don't think this is fundamentally a problem with
cbook.report_memory.

Eric

In [1]: from matplotlib.pylab import *

In [2]: import matplotlib.cbook as cbook

In [3]: data = ones((1500,1500,3))

In [4]: imshow(data)
Out[4]: <matplotlib.image.AxesImage at 0x109d343d0>

In [5]: ax = gca()

In [6]: print cbook.report_memory()
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-6-88a73a5ab996> in <module>()
----> 1 print cbook.report_memory()

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py
in report_memory(i)
     1210 elif sys.platform.startswith('darwin'):
     1211 a2 = Popen('ps -p %d -o rss,vsz' % pid, shell=True,
-> 1212 stdout=PIPE).stdout.readlines()
     1213 mem = int(a2[1].split()[0])
     1214 elif sys.platform.startswith('win'):

IOError: [Errno 4] Interrupted system call

First I thought, maybe this doesn't run in IPython for a reason, but
trying it as a script also fails:

(general_dev+)[maye@...4404... ~/Dropbox/src/pymars]$ python imshow_test.py
Traceback (most recent call last):
    File "imshow_test.py", line 7, in <module>
      print cbook.report_memory()
    File
"/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py",
line 1212, in report_memory
      stdout=PIPE).stdout.readlines()
IOError: [Errno 4] Interrupted system call

Is this cbook recipe maybe broken?

Best,
Michael

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I have a vague recollection of a similar problem faced by @dopplershift when he was updating the animation module to pipe a stream to a mencoder/ffmpeg process on certain Macs. Maybe this is the same problem?

···

On Wed, Jul 17, 2013 at 9:18 AM, Michael Droettboom <mdroe@…86…> wrote:

To debug, it might be helpful to try

ps -p PID -o rss,vsz

(where PID is the process id of an interesting process)

and see what happens.

Mike

On 07/17/2013 02:05 AM, Eric Firing wrote:

On 2013/07/16 5:50 PM, K.-Michael Aye wrote:

Hi!

I have just run an old code that I believe was working before on OSX.

I am trying this with matplotlib 1.2.1 on an OSX EPD running Python 2.7.3

It works for me with OSX Mountain Lion and mpl 1.2.1 compiled from

source. I don’t think this is fundamentally a problem with

cbook.report_memory.

Eric

In [1]: from matplotlib.pylab import *

In [2]: import matplotlib.cbook as cbook

In [3]: data = ones((1500,1500,3))

In [4]: imshow(data)

Out[4]: <matplotlib.image.AxesImage at 0x109d343d0>

In [5]: ax = gca()

In [6]: print cbook.report_memory()


IOError Traceback (most recent call last)

in ()

----> 1 print cbook.report_memory()

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py

in report_memory(i)

 1210     elif sys.platform.startswith('darwin'):
 1211         a2 = Popen('ps -p %d -o rss,vsz' % pid, shell=True,

-> 1212 stdout=PIPE).stdout.readlines()

 1213         mem = int(a2[1].split()[0])
 1214     elif sys.platform.startswith('win'):

IOError: [Errno 4] Interrupted system call

First I thought, maybe this doesn’t run in IPython for a reason, but

trying it as a script also fails:

(general_dev+)[maye@…4404… ~/Dropbox/src/pymars]$ python imshow_test.py

Traceback (most recent call last):

File "imshow_test.py", line 7, in <module>
  print cbook.report_memory()
File

“/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py”,

line 1212, in report_memory

  stdout=PIPE).stdout.readlines()

IOError: [Errno 4] Interrupted system call

Is this cbook recipe maybe broken?

Best,

Michael


See everything from the browser to the database with AppDynamics

Get end-to-end visibility with application monitoring from AppDynamics

Isolate bottlenecks and diagnose root cause in seconds.

Start your free trial of AppDynamics Pro today!

http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


See everything from the browser to the database with AppDynamics

Get end-to-end visibility with application monitoring from AppDynamics

Isolate bottlenecks and diagnose root cause in seconds.

Start your free trial of AppDynamics Pro today!

http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


See everything from the browser to the database with AppDynamics

Get end-to-end visibility with application monitoring from AppDynamics

Isolate bottlenecks and diagnose root cause in seconds.

Start your free trial of AppDynamics Pro today!

http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users