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

IDLE is unable to open any.py files #104719

Closed
Assignees
pablogsalterryjreedy
Labels
3.12only security fixesstdlibPython modules in the Lib dirtopic-IDLEtype-bugAn unexpected behavior, bug, or error
@AlexWaygood

Description

@AlexWaygood

With a fresh CPython build (be0c106), IDLE is unable to open any.py files.

To reproduce:

  1. Create an empty.py file with the namerepro.py
  2. Runpython -m idlelib repro.py

IDLE still seems able to create new.py files and save them; it just can't open pre-existing.py files right now.

Traceback observed

C:\Users\alexw\coding\cpython>python -m idlelib repro.pyRunning Debug|x64 interpreter...Traceback (most recent call last):  File"C:\Users\alexw\coding\cpython\Lib\runpy.py", line198, in_run_module_as_mainreturn _run_code(code, main_globals,None,^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"C:\Users\alexw\coding\cpython\Lib\runpy.py", line88, in_run_codeexec(code, run_globals)  File"C:\Users\alexw\coding\cpython\Lib\idlelib\__main__.py", line7, in<module>    idlelib.pyshell.main()  File"C:\Users\alexw\coding\cpython\Lib\idlelib\pyshell.py", line1640, inmainif flist.open(filename)isNone:^^^^^^^^^^^^^^^^^^^^  File"C:\Users\alexw\coding\cpython\Lib\idlelib\filelist.py", line37, inopen    edit=self.EditorWindow(self, filename, key)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"C:\Users\alexw\coding\cpython\Lib\idlelib\pyshell.py", line135, in__init__    EditorWindow.__init__(self,*args)  File"C:\Users\alexw\coding\cpython\Lib\idlelib\editor.py", line289, in__init__self.set_indentation_params(is_py_src)  File"C:\Users\alexw\coding\cpython\Lib\idlelib\editor.py", line1327, inset_indentation_params    i=self.guess_indent()^^^^^^^^^^^^^^^^^^^  File"C:\Users\alexw\coding\cpython\Lib\idlelib\editor.py", line1574, inguess_indent    opener, indented= IndentSearcher(self.text,self.tabwidth).run()^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"C:\Users\alexw\coding\cpython\Lib\idlelib\editor.py", line1646, inrun    save_tabsize= tokenize.tabsize^^^^^^^^^^^^^^^^AttributeError:module 'tokenize' has no attribute 'tabsize'

Environment

(Given the cause of the bug, the environment details shouldn't really be relevant; but they're included here anyway, for completeness.)

Python 3.12.0a7+ (heads/main:be0c106789, May 21 2023, 12:00:27) [MSC v.1932 64 bit (AMD64)] on win32

Reproduces on a debug and non-debug build, FWIW.

Linked PRs

Metadata

Metadata

Labels

3.12only security fixesstdlibPython modules in the Lib dirtopic-IDLEtype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp