[IPython-user] Slight Problem: Re: Test results (good?)
Ryan Krauss
ryanlists@gmail....
Thu Apr 26 15:07:38 CDT 2007
I now have a slight problem that I seem to be getting extra stuff in
my traceback during ordinary errors (i.e. I didn't press Ctrl-C).
Here is what I am getting:
In [3]: run bicycle.py
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent call
last)
E:\siue\AdvDynamics\chapter5\bicycle.py
103 thetalist=['$\\theta_'+item+'$' for item in xyzlist]
104 solegend=thetalist+omegaleg
--> 105 omegaplot(3,t,outSO,legend=solegend)
106
107 show()
TypeError: omegaplot() got an unexpected keyword argument 'legend'
WARNING: Failure executing file: <bicycle.py>
---------------------------------------------------------------------------
exceptions.AttributeError Traceback (most recent call
last)
E:\siue\AdvDynamics\chapter5\<ipython console>
C:\Python24\Lib\site-packages\IPython\iplib.py in ipmagic(self, arg_s)
955 else:
956 magic_args = self.var_expand(magic_args,1)
--> 957 return fn(magic_args)
958
959 def ipalias(self,arg_s):
C:\Python24\Lib\site-packages\IPython\Shell.py in magic_run(self, parameter_s)
544
545 def magic_run(self,parameter_s=''):
--> 546 Magic.magic_run(self,parameter_s,runner=self.mplot_exec)
547
548 # Fix the docstring so users see the original as well
C:\Python24\Lib\site-packages\IPython\Magic.py in magic_run(self, parameter_s, r
unner)
1674 if restore_main:
1675 sys.modules['__main__'] = restore_main
-> 1676 self.shell.reloadhist()
1677
1678 return stats
C:\Python24\Lib\site-packages\IPython\iplib.py in reloadhist(self)
1255
1256 if self.has_readline:
-> 1257 self.readline.clear_history()
1258 self.readline.read_history_file(self.shell.histfile)
1259
AttributeError: 'module' object has no attribute 'clear_history'
If I scroll back up, this much
In [3]: run bicycle.py
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent call
last)
E:\siue\AdvDynamics\chapter5\bicycle.py
103 thetalist=['$\\theta_'+item+'$' for item in xyzlist]
104 solegend=thetalist+omegaleg
--> 105 omegaplot(3,t,outSO,legend=solegend)
106
107 show()
TypeError: omegaplot() got an unexpected keyword argument 'legend'
is actually helpful. From there down, it confused me.
Ryan
On 4/26/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> I'm happy. I just wasn't sure if you would be. :D (i.e. I didn't
> know what the results were supposed to be).
>
> This is a significant feature in my mind. There have been many times
> when I went "Oh crap!, I shouldn't have run that script with that
> input", and then I have to decide if it is worth it to just close
> IPython altogether or wait it out.
>
> Ryan
>
> On 4/26/07, Fernando Perez <fperez.net@gmail.com> wrote:
> > On 4/25/07, Ryan Krauss <ryanlists@gmail.com> wrote:
> > > I just downloaded 0.8.1 and pyreadline 1.4.3.rc1 and tested the Ctrl-C
> > > interrupt. I think it worked but don't know how clean an exit I was
> > > supposed to get. My script stopped but printed out this:
> >
> > Looks good enough :) Basically, since Ctrl-C is by definition
> > asynchronous, the only things we can try to provide are:
> >
> > 1. Your code actually stops running.
> >
> > 2. Python doesn't crash at that point, nor does your session somehow
> > get corrupted in a bizarre manner that makes it unusable from that
> > point on.
> >
> > 3. [bonus] you get a meaningful traceback.
> >
> >
> > It seems like you got all 3 :)
> >
> > Cheers,
> >
> >
> > f
> >
>
More information about the IPython-user
mailing list