Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load uses "strip" on non-strings #8652

Closed
williamstein opened this issue Apr 6, 2010 · 4 comments
Closed

load uses "strip" on non-strings #8652

williamstein opened this issue Apr 6, 2010 · 4 comments

Comments

@williamstein
Copy link
Contributor

I got this bug/traceback today by making a file grader.py and a file grader.sage (their content doesn't matter).

sage: import grader
sage: load grader.sage
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/Users/wstein/edu/2010/480/grading/<ipython console> in <module>()

/Users/wstein/sage/build/sage/local/lib/python2.6/site-packages/sage/misc/preparser.pyc in load(filename, globals, attach)
   1487             return
   1488         
-> 1489     filename = filename.strip()
   1490     
   1491     if filename.lower().startswith('http://'):

AttributeError: 'module' object has no attribute 'strip'
sage: 

The above bug is the fault of the rewrite I did of load and attach, so is my fault.

CC: @nexttime

Component: user interface

Keywords: sd40.5

Issue created by migration from https://trac.sagemath.org/ticket/8652

@williamstein williamstein added this to the sage-5.11 milestone Apr 6, 2010
@williamstein williamstein self-assigned this Apr 6, 2010
@nexttime
Copy link
Mannequin

nexttime mannequin commented Apr 7, 2010

comment:1

Did I miss something?

If I create both files foo.py and foo.sage, then

sage: import foo
I am foo.py
sage: load foo.sage
I am foo.sage

doesn't give an error (in 4.3.5).

@dandrake
Copy link
Contributor

comment:2

I'm using 4.3.4 and I see the same thing as leif -- worksforme. Perhaps the content of grader.py and grader.sage does matter?

@dandrake
Copy link
Contributor

Changed keywords from none to sd40.5

@dandrake
Copy link
Contributor

comment:3

This still works properly on 5.1.beta0. In two years no one has reported or reproduced this bug; I propose we close it.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@mezzarobba mezzarobba removed this from the sage-6.2 milestone Mar 15, 2014
@vbraun vbraun closed this as completed Mar 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants