Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

NullReferenceException when non-generic type is given type parameters #1325

Closed
@tminka

Description

@tminka

Environment

  • Pythonnet version:latest git commit
  • Python version: 3.7
  • Operating System: Windows 10 64-bit

Details

The following incorrect Python code produces a confusing NullReferenceException, instead of a more helpful error message:

fromSystem.CollectionsimportIListIList[bool]
  • If there was a crash, please include the traceback here.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.   at Python.Runtime.GenericUtil.GenericByName(String ns, String name, Int32 paramCount)   at Python.Runtime.ClassBase.type_subscript(IntPtr idx)

A more helpful message would be:System.Collections.IList is not a generic type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp