Skip to content

When python>=3.11, error name __file__ is not defined #205

Description

@lldacing

Describe the bug*

When python>=3.11, variable __file__ is not recognized

To Reproduce

test code:

import os


if __name__ == '__main__':
    os.path.realpath(__file__)

Expected behavior

Run through

Screenshots

image

Desktop or remote (please complete the following information):**

  • OS: Windows 11
  • OS version: 23H2
  • M1 chip: no
  • Reloadium package version: none
  • PyCharm plugin version: 1.5.1
  • Editor: PyCharm 2024.2.4
  • Python Version: >=3.11
  • Python Architecture: 64bit
  • Run mode: Run or Debug

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