1
我使用IronPython 2.6.10920.0 on .NET 4.0.30319.1
作爲linux下的HFSS現場仿真軟件的一部分。而且我有一個奇怪的問題與json
模塊:json.loads中的MissingMemberException()
>>>import json
>>>print json.dumps('foo')
'"foo"'
>>>print json.loads('"foo"')
MissingMemberException: 'NoneType' object has no attribute 'scanner'
可能是什麼原因?我怎樣才能使它工作?
UPD:當我包裹上面的代碼爲try: .. except .., e: print e
,我得到這樣的輸出:
System.MissingMemberException: 'NoneType' object has no attribute 'scanner'
at (wrapper dynamic-method) object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,IronPython.Runtime.CodeContext)
at Microsoft.Scripting.Interpreter.DynamicInstruction`3[System.Object,IronPython.Runtime.CodeContext,System.Object].Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.Interpreter.Interpreter.RunInstructions (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0
是什麼,他要告訴我這個?