Right. I didn't even think about that, it looks like this is the
source of the error
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
路路路
On 8/6/07, Chris Mellon wrote:
On 8/6/07, Stef Mientki <s.mientki@ru.nl> wrote:
> hello,
>
> I've a weird error, and absolutely don't know where to start looking.
> Now the second problem is of course how to describe the problem,
> because I don't know which parts of the program are relevant
>
> But maybe one of you is able to help me of to point me in the right
> direction,
> this is the traceback:
>
> Traceback (most recent call last):
> File "D:\data_to_test\JALsPy\JALsPy.py", line 293, in ?
> Run_JALsPy_Application ()
> File "D:\data_to_test\JALsPy\JALsPy.py", line 274, in
> Run_JALsPy_Application
> JG.app.MainLoop()
> File "D:\data_to_test\JALsPy\JALsPy.py", line 212, in MainLoop
> import JAL_simulation_file
> File "D:\data_to_test\JALsPy\JAL_simulation_file.py", line 1, in ?
> from rapid_prototyping_board_16F877 import * ;JSM(1)
> File "D:\data_to_test\JALsPy\rapid_prototyping_board_16F877.py", line
> 198, in JSM
> Python_Debug_Delay ( line_nr)
> File "D:\data_to_test\JALsPy\JALsPy.py", line 77, in Python_Debug_Delay
> Device.Execute()
> File "D:\data_to_test\JALsPy\device_R.py", line 45, in Execute
> self._Redraw()
> File "D:\data_to_test\JALsPy\device.py", line 484, in _Redraw
> self.shape.Flash()
> File
> "P:\Python\lib\site-packages\wx-2.8-msw-ansi\wx\lib\ogl\_basic.py", line
> 1166, in Flash
> self.Draw(dc)
> File
> "P:\Python\lib\site-packages\wx-2.8-msw-ansi\wx\lib\ogl\_basic.py", line
> 1154, in Draw
> self.GetEventHandler().OnDraw(dc)
> File
> "P:\Python\lib\site-packages\wx-2.8-msw-ansi\wx\lib\ogl\_basic.py", line
> 88, in OnDraw
> self._previousHandler.OnDraw(dc)
> File "D:\data_to_test\JALsPy\ogl_resistor.py", line 47, in OnDraw
> N = int (log10(self.Value)) + 1
> TypeError: int() argument must be a string or a number
>
>
> So it looks like something is going wrong with the log calculation,
> ( before the program crashes, the same calculation with about the same
> values is already performed 30 times without any problem,
> the program also crashes always at the same moment )
>
> To investigate the error, I put a few print statements before the crash
> line, like this:
> from scipy import log10
> print self.Value
> print log10(self.Value)
> N = int (log10(self.Value)) + 1
>
> happily I get the same crash at the same moment, and the output looks
> like this:
> 100
> NotImplemented
><snipped>
self.Value is almost certainly a string.