# another "how to debug" issue

I primarily use Sage for numerical computation, working with numpy, scipy, gsl, R, etc. as well as my own interfaces to external software. Symbolic computing won't do much good on the types of problems I'm working on. I use Sage to have access to a wider variety of plotting options, as well as the wrappers and glue code. If it were possible, I would turn off symbolic computing completely as unnecessary overhead.

I've recently discovered that when running program 1 (say aaa.sage) followed by program 2 (bbb.sage), I get the not unusual error TypeError: unable to simplify to float approximation

So I know I just need a float() somewhere to convert a symbolic value. If I exit Sage and start again, each program runs fine alone. It's only when the one is executed after the other that the error occurs. (I assume there's a way to clear the workspace without exiting, but I can't currently find it in the documentation).

The problem is Sage does not say where the error occurs. We've all seen the standard generic error pointing to: exec(preparse_file(open(fpath).read()) + "\n", globals)

I now have large files of developed code and don't know how to find the offending line without laborious use of print statements. Any suggestions?

To clear the defined variables, you can call "reset()". Could you add a reset() before running bbb to see what happens? (Hmm. On second thought, my first guess about what's going on -- variables leaking -- would produce the opposite symptom, namely that it would appear to work when run together but not when run separately.)