Attach problem

50 views
Skip to first unread message

Jon Silverberg

unread,
Jun 25, 2013, 11:06:07 PM6/25/13
to sage-...@googlegroups.com
Hi,

This is my first time writing a bug and I hope this is the correct place to post it.

I recently upgraded to a new mac and downloaded Sage 5.10 OSX 64bit for Mac 10.8. I'm running 10.8.2.

If I attach a file using "attach /Users/foo/bar.py", the first time I execute the cell everything is good. However, as soon as I modify bar.py, I get the error:

"File "<stdin>", line 1, in <module>
File "_sage_input_4.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YXR0YWNoKCIvVXNlcnMvam9uL0RvY3MvRW5naW5lZXJpbmcvQ29kZXMvU0VNL1NFTXYxLjAwMjcvU2VtLnB5Iik="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>

File "/private/var/folders/49/ph5_bsvj6bz_8hg_yrbkct900000gn/T/tmp10Xs3J/___code___.py", line 2
"/Users/foo/bar.py"
^
IndentationError: unexpected indent"

I've looked at the ___code___.py file which is generated, and indeed, there is an extra space on line 2 which is before "/Users/foo/bar.py".

Is this related to Mac os x 10.8.2 or sage 5.1? Has anyone seen this or is a workaround present?

Sincerely,
Jon

Volker Braun

unread,
Jun 25, 2013, 11:20:11 PM6/25/13
to sage-...@googlegroups.com
Attaching files in the notebook doesn't work currently (might have never worked). Attaching files on the command line should work. See also:

Jon Silverberg

unread,
Jun 26, 2013, 12:00:51 AM6/26/13
to sage-...@googlegroups.com
Thanks for the reply.  I know that attaching files in a notebook did work quite well in Mac os 10.7.x and I am unsure which sage version I was running (it was at least 5.x).  

Sincerely,
Jon

Volker Braun

unread,
Jun 26, 2013, 12:08:13 AM6/26/13
to sage-...@googlegroups.com
Thanks, I added the info to the bug report. It is not an OS issue since I get the same failure on Fedora 19 x86_64.

Jon Silverberg

unread,
Jun 27, 2013, 9:54:04 PM6/27/13
to sage-...@googlegroups.com
By the way, I reverted to what I downloaded on my previous machine: Sage-5.5-OSX-64bit-10.6.app.  All attach functionality works.

-Jon
Reply all
Reply to author
Forward
0 new messages