Hi,
Update on my last post ...
I just finished compiling sage from source (on the same machine)
which completely succeeded and overall seems to be working fine but
it looks like there are still plotting errors.
(The final error is almost identical to the one I got when I
tried to install stand-alone matplotlib, so it's looking like
the problem is coming from that side)
Any thoughts on this one?
I've already began looking into this problem,
but I have no good leads yet.
Thanks,
-Alex
Here is the full traceback:
sage: plot(sin(1/x), (-1, 1), plot_points=1000)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)
/Users/agc/sage-2.10/<ipython console> in <module>()
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/IPython/Prompts.py in
__call__(self, arg)
521
522 # and now call a possibly user-defined print mechanism
--> 523 manipulated_val = self.display(arg)
524
525 # user display hooks can change the variable to be
stored in
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/IPython/Prompts.py in
_display(self, arg)
545 """
546
--> 547 return self.shell.hooks.result_display(arg)
548
549 # Assign the default display method:
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/IPython/hooks.py in
__call__(self, *args, **kw)
132 #print "prio",prio,"cmd",cmd #dbg
133 try:
--> 134 ret = cmd(*args, **kw)
135 return ret
136 except ipapi.TryNext, exc:
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/IPython/hooks.py in
result_display(self, arg)
160
161 if self.rc.pprint:
--> 162 out = pformat(arg)
163 if '\n' in out:
164 # So that multi-line strings line up with the left
column of
/Users/agc/sage-2.10/local/lib/python2.5/pprint.py in pformat(self, object)
109 def pformat(self, object):
110 sio = _StringIO()
--> 111 self._format(object, sio, 0, 0, {}, 0)
112 return sio.getvalue()
113
/Users/agc/sage-2.10/local/lib/python2.5/pprint.py in _format(self, object,
stream, indent, allowance, context, level)
127 self._readable = False
128 return
--> 129 rep = self._repr(object, context, level - 1)
130 typ = _type(object)
131 sepLines = _len(rep) > (self._width - 1 - indent -
allowance)
/Users/agc/sage-2.10/local/lib/python2.5/pprint.py in _repr(self, object,
context, level)
193 def _repr(self, object, context, level):
194 repr, readable, recursive = self.format(object, context.copy
(),
--> 195 self._depth, level)
196 if not readable:
197 self._readable = False
/Users/agc/sage-2.10/local/lib/python2.5/pprint.py in format(self, object,
context, maxlevels, level)
205 and whether the object represents a recursive construct.
206 """
--> 207 return _safe_repr(object, context, maxlevels, level)
208
209
/Users/agc/sage-2.10/local/lib/python2.5/pprint.py in _safe_repr(object,
context, maxlevels, level)
290 return format % _commajoin(components), readable, recursive
291
--> 292 rep = repr(object)
293 return rep, (rep and not rep.startswith('<')), False
294
/Users/agc/sage-2.10/sage_object.pyx in
sage.structure.sage_object.SageObject.__repr__()
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/sage/plot/plot.py in
_repr_(self)
474 def _repr_(self):
475 if SHOW_DEFAULT:
--> 476 self.show()
477 return ''
478 else:
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/sage/plot/plot.py in
show(self, xmin, xmax, ymin, ymax, figsize, filename, dpi, axes, axes_label,
frame, fontsize, **args)
723 if filename is None:
724 filename = sage.misc.misc.tmp_filename() + '.png'
--> 725 self.save(filename, xmin, xmax, ymin, ymax, figsize,
dpi=dpi, axes=axes,frame=frame, fontsize=fontsize)
726 os.system('%s %s 2>/dev/null 1>/dev/null &'%(
sage.misc.viewer.browser(), filename))
727
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/sage/plot/plot.py in
save(self, filename, xmin, xmax, ymin, ymax, figsize, figure, sub, savenow,
dpi, axes, axes_label, fontsize, frame, verify)
790 axes = self.__show_axes
791
--> 792 from matplotlib.figure import Figure
793 if filename is None:
794 filename = sage.misc.misc.graphics_filename()
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/matplotlib/figure.py
in <module>()
8 import artist
9 from artist import Artist
---> 10 from axes import Axes, Subplot, PolarSubplot, PolarAxes
11 from cbook import flatten, allequal, Stack, iterable, dedent
12 import _image
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/matplotlib/axes.py in
<module>()
11 from matplotlib import artist as martist
12 from matplotlib import agg
---> 13 from matplotlib import axis as maxis
14 from matplotlib import cbook
15 from matplotlib import collections as mcoll
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/matplotlib/axis.py in
<module>()
18 from transforms import Value, blend_xy_sep_transform,\
19 translation_transform, bbox_all, identity_transform
---> 20 from font_manager import FontProperties
21 from text import Text, TextWithDash, _process_text_args
22 from patches import bbox_artist
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/matplotlib/font_manager.py
in <module>()
1112
1113 else:
-> 1114 _fmcache = os.path.join(get_configdir(), 'fontManager.cache')
1115
1116 fontManager = None
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/matplotlib/__init__.py
in wrapper(*args, **kwargs)
205 assert(callable, func)
206 def wrapper(*args, **kwargs):
--> 207 ret = func(*args, **kwargs)
208
209 if (always or not wrapper._spoke):
/Users/agc/sage-2.10/local/lib/python2.5/site-packages/matplotlib/__init__.py
in _get_configdir()
398 if os.path.exists(p):
399 if not _is_writable_dir(p):
--> 400 raise RuntimeError("'%s' is not a writable dir; you must
set %s/.matplotlib to be a writable dir. You can also set environment
variable MPLCONFIGDIR to any writable directory where you want matplotlib
data stored "%h)
401 else:
402 if not _is_writable_dir(h):
<type 'exceptions.TypeError'>: not enough arguments for format string
On Jan 29, 2008 12:10 PM, alex clemesha <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I just grabbed the latest Mac OSX10.5 binary from here:
> http://sagemath.org/SAGEbin/apple_osx/intel/sage-2.10-osx-10.5-intel.dmg
>
> (because incidentally I think running Sage's matplotlib will be by
> far the easiest way of getting matplotlib working on OSX leopard for
> someone else that I work with)
>
> in the notebook:
>
> x = var('x')
> p = plot(sin(x), -3, 3)
> show(p)
>
>
> gives this errors:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
>
> File "/Users/agc/.sage/sage_notebook/worksheets/admin/1/code/2.py", line 6,
> in <module>
> show(p)
> File
> "/Applications/sage/local/lib/python2.5/site-packages/sympy/plotting/", line
> 1, in <module>
>
>
> File
> "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/sage/misc/functional.py",
> line 888, in show
> File
> "/Applications/sage/local/lib/python2.5/site-packages/sympy/plotting/plot.py",
> line 721, in show
>
>
> File
> "/Applications/sage/local/lib/python2.5/site-packages/sympy/plotting/plot.py",
> line 792, in save
>
> File
> "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/matplotlib/figure.py",
> line 10, in <module>
>
> File
> "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/matplotlib/axes.py",
> line 13, in <module>
> File
> "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/matplotlib/axis.py",
> line 20, in <module>
>
> File
> "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/matplotlib/font_manager.py",
> line 1114, in <module>
> File
> "/Applications/sage/local/lib/python2.5/site-packages/sympy/plotting/__init__.py",
> line 207, in wrapper
>
>
> File
> "/Applications/sage/local/lib/python2.5/site-packages/sympy/plotting/__init__.py",
> line 400, in _get_configdir
>
> TypeError: not enough arguments for format string
>
>
> My first (slightly obvious) though is there is some hard coding
> in the binary, i.e. "/Users/was/"
> I'm pretty sure 'was' (William) doesn't have an account on my machine ;)
>
> Any thoughts? Maybe a new binary is in order?
> thanks,
> Alex
>
>
>
>
>
>
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---