Coder Social home page Coder Social logo

TypeError: Unable to cast object of type 'Microsoft.Scripting.Runtime.Uninitialized' to type 'System.Exception' when using -X:Tracing about main HOT 1 CLOSED

ironlanguages avatar ironlanguages commented on July 17, 2024
TypeError: Unable to cast object of type 'Microsoft.Scripting.Runtime.Uninitialized' to type 'System.Exception' when using -X:Tracing

from main.

Comments (1)

markusschaber avatar markusschaber commented on July 17, 2024

It also works when the script itself sets a trace handler, without setting -X:Tracing from outside:

C:\Program Files (x86)\IronPython 2.7>ipy.exe
IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.34209 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> def trace(*args, **kwargs):
...     return trace
...
>>> trace
<function trace at 0x000000000000002B>
>>> sys.settrace(trace)
>>> import mimetypes
>>> mimetypes.guess_type("test.txt")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\Lib\mimetypes.py", line 294, in guess_type
  File "C:\Program Files (x86)\IronPython 2.7\Lib\mimetypes.py", line 355, in init
  File "C:\Program Files (x86)\IronPython 2.7\Lib\mimetypes.py", line 259, in read_windows_registry
  File "C:\Program Files (x86)\IronPython 2.7\Lib\mimetypes.py", line 245, in enum_types
TypeError: Das Objekt des Typs "Microsoft.Scripting.Runtime.Uninitialized" kann nicht in Typ "System.Exception" umgewandelt werden.

from main.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.