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

importlib.util._find_spec_from_path('__main__') fails #117742

Open
Labels
stdlibPython modules in the Lib dirtopic-importlibtype-bugAn unexpected behavior, bug, or error
@terryjreedy

Description

@terryjreedy

Bug report

Module pyclbr cannot browse a file named__main__ because it cannot get the spec.

>>>fromimportlibimportutil>>>util._find_spec_from_path('__init__')ModuleSpec(name='__init__',loader=<_frozen_importlib_external.SourceFileLoaderobjectat0x000001C6C2462DB0>,origin='C:\\Programs\\Python313\\Lib\\idlelib\\__init__.py')>>>util._find_spec_from_path('__main__')Traceback (mostrecentcalllast):File"<pyshell#14>",line1,in<module>util._find_spec_from_path('__main__')File"<frozen importlib.util>",line67,in_find_spec_from_pathValueError:__main__.__spec__isNone

This is 3.13.0a5 but same in prior versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtopic-importlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp