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

Appearance settings

Tkinter getint(), getboolean() argument must be str, not tuple #118760

Copy link
Copy link
Closed
@zooba

Description

@zooba
Issue body actions

Bug report

Discovered during 3.13b1 release (we decided not to block the release over it, so this is just a known issue in b1):

While interacting with the config dialog in IDLE, I get these errors printed in the background.

Exception in Tkinter callback
Traceback (most recent call last):
  File "D:\cpython\Lib\tkinter\__init__.py", line 2064, in __call__
    args = self.subst(*args)
  File "D:\cpython\Lib\tkinter\__init__.py", line 1752, in _substitute
    e.state = getint_event(s)
              ~~~~~~~~~~~~^^^
  File "D:\cpython\Lib\tkinter\__init__.py", line 1726, in getint_event
    return getint(s)
TypeError: getint() argument must be str, not tuple

I suspect this is the underlying cause of these test failures, which were discovered in our final stage testing of the Windows release:

======================================================================
ERROR: test_highlight_target_text_mouse (idlelib.idle_test.test_configdialog.HighPageTest.test_highlight_target_text_mouse)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\1\b\Python\Lib\idlelib\idle_test\test_configdialog.py", line 447, in test_highlight_target_text_mouse
    eq(d.highlight_target.get(), elem[tag])
                                 ~~~~^^^^^
KeyError: 'sel'

======================================================================
FAIL: test_highlight_sample_b1_motion (idlelib.idle_test.test_configdialog.HighPageTest.test_highlight_sample_b1_motion)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\1\b\Python\Lib\idlelib\idle_test\test_configdialog.py", line 493, in test_highlight_sample_b1_motion
    eq(hs.tag_ranges('sel'), ())
    ~~^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (<string object: '1.0'>, <string object: '1.24'>) != ()

First tuple contains 2 additional elements.
First extra element 0:
<string object: '1.0'>

- (<string object: '1.0'>, <string object: '1.24'>)
+ ()

======================================================================
FAIL: test_highlight_sample_double_click (idlelib.idle_test.test_configdialog.HighPageTest.test_highlight_sample_double_click)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\1\b\Python\Lib\idlelib\idle_test\test_configdialog.py", line 471, in test_highlight_sample_double_click
    eq(hs.tag_ranges('sel'), ())
    ~~^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (<string object: '1.0'>, <string object: '1.24'>) != ()

First tuple contains 2 additional elements.
First extra element 0:
<string object: '1.0'>

- (<string object: '1.0'>, <string object: '1.24'>)
+ ()

----------------------------------------------------------------------

Possibly related to @serhiy-storchaka's recent changes?

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.