[IronPython] System.Convert Problem
Davy Mitchell
daftspaniel at gmail.com
Fri Mar 10 21:45:50 CET 2006
Hi Folks,
I am trying to get the following to work:
print Convert.ToInt32('A')
An error is thrown complaining:
Input string was not in a correct format.
Full stack trace below.
Have a great weekend!
Thanks,
Davy Mitchell
Mood News
- BBC News Headlines Auto-Classified as Good, Bad or Neutral.
http://www.latedecember.com/sites/moodnews/
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at IronPython.Runtime.BuiltinFunction.Invoke(MethodBinding binding)
at IronPython.Runtime.ReflectedMethodBase.TryCallWorker(Object[]
args, Object& ret)
at IronPython.Runtime.ReflectedMethodBase.Call(Object[] args)
at IronPython.Runtime.ReflectedMethodBase.Call(ICallerContext
context, Object[] args)
at IronPython.Runtime.ReflectedMethodBase.Call(ICallerContext
context, Object arg0)
at IronPython.Runtime.Ops.CallWithContext(ICallerContext context,
Object func, Object arg0)
at __main__.ASC_click$f0(Object f, Object a) in K:\Dev\IP\wfdemo.py:line 61
at IronPython.Runtime.Function2.Call(Object arg0, Object arg1)
at IronPython.Runtime.Function2.Call(Object[] args)
at IronPython.Runtime.Ops.Call(Object func, Object[] args)
at IronPython.Runtime.ReflectedEvent.EventDispatcher.Call(Object[] args)
at IronPython.Runtime.Ops.Call(Object func, Object arg0, Object arg1)
at System.EventHandler##92(Object , Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
IronPythonConsole
Assembly Version: 1.0.2258.21879
Win32 Version: 1.0.2258.21879
CodeBase: file:///C:/ip/IronPython-1.0-Beta4/IronPythonConsole.exe
----------------------------------------
IronPython
Assembly Version: 1.0.2258.21878
Win32 Version: 1.0.2258.21878
CodeBase: file:///C:/ip/IronPython-1.0-Beta4/IronPython.DLL
----------------------------------------
snippets
Assembly Version: 0.0.0.0
Win32 Version: 1.0.2258.21878
CodeBase: file:///C:/ip/IronPython-1.0-Beta4/IronPython.dll
----------------------------------------
IronMath
Assembly Version: 1.0.2258.21878
Win32 Version: 1.0.2258.21878
CodeBase: file:///C:/ip/IronPython-1.0-Beta4/IronMath.DLL
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
site
Assembly Version: 0.0.0.0
Win32 Version: 1.0.2258.21878
CodeBase: file:///C:/ip/IronPython-1.0-Beta4/IronPython.dll
----------------------------------------
ISymWrapper
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/ISymWrapper/2.0.0.0__b03f5f7f11d50a3a/ISymWrapper.dll
----------------------------------------
wfdemo
Assembly Version: 0.0.0.0
Win32 Version: 1.0.2258.21878
CodeBase: file:///C:/ip/IronPython-1.0-Beta4/IronPython.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
More information about the Ironpython-users
mailing list