Ask Your Question

'module' object has no attribute 'graphics_filename'

asked 2012-12-07 00:44:40 -0500

AndreWin gravatar image

updated 2012-12-07 01:02:35 -0500

kcrisman gravatar image

Hello everybody! I typed at Sage Notebook:

a = animate([circle((i,i), 1-1/(i+1), hue=i/10) for i in srange(0,2,0.2)], xmin=0,ymin=0,xmax=2,ymax=2,figsize=[2,2])

I got the message:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "", line 10, in <module>
    exec compile(u'open("","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YSA9IGFuaW1hdGUoW2NpcmNsZSgoaSxpKSwgMS0xLyhpKzEpLCBodWU9aS8xMCkgZm9yIGkgaW4gc3JhbmdlKDAsMiwwLjIpXSwgeG1pbj0wLHltaW49MCx4bWF4PTIseW1heD0yLGZpZ3NpemU9WzIsMl0pCmEuc2hvdygp"),globals())+"\\n"); execfile(os.path.abspath(""))
File "", line 1, in <module>

File "/tmp/tmpWYgSDe/", line 4, in <module>
    exec compile(u'
File "", line 1, in <module>

File "/home/andrei/sage-5.4/local/lib/python2.7/site-packages/sage/plot/", line 458, in show
    self.gif(delay = delay, iterations = iterations)
 File "/home/andrei/sage-5.4/local/lib/python2.7/site-packages/sage/plot/", line 381, in gif
    savefile = sage.misc.misc.graphics_filename(ext='gif')
AttributeError: 'module' object has no attribute 'graphics_filename'

Please help me to understand what went wrong. What is missing? Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-12-07 01:15:50 -0500

kcrisman gravatar image

updated 2012-12-07 01:22:49 -0500

This works for me at the command line, but you are right that in the notebook it doesn't, and there definitely isn't graphics_filename() in sage.misc.misc. This must be a recent regression, I think, as it works in Sage 5.3. The bug is at line 457 of the animate file, where it calls the gif method in the notebook, which is clearly wrong now. (Line 557 also calls this nonexistent function.)

For now, I'd suggest doing


which works for me on

Edit: the fix will be easy enough, see Trac ticket 13807.

edit flag offensive delete link more


Thanks a lot! I will check it on my work computer on Monday.

AndreWin gravatar imageAndreWin ( 2012-12-07 04:35:55 -0500 )edit

Notice that #13807 now has positive review, and if we're lucky will get into Sage 5.5.

kcrisman gravatar imagekcrisman ( 2012-12-09 13:02:59 -0500 )edit

It's work now (sage 5.9)! Thanks!

AndreWin gravatar imageAndreWin ( 2013-06-01 00:47:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-12-07 00:44:40 -0500

Seen: 442 times

Last updated: Dec 07 '12