[issue13519] Tkinter rowconfigure and columnconfigure functions crash if minsize, pad, or weight is not None

aoi.leslie report at bugs.python.org
Fri Dec 2 10:11:11 CET 2011


New submission from aoi.leslie <aoi.leslie at gmail.com>:

Symptom:
When use tkinter Widget class's rowconfigure or columnconfigure function (The two functions are defined in baseclass Misc.) to get the setting for a row or column (The setting is a dict containing fields 'minsize', 'pad', 'weight', and 'uniform'.), if field value of 'minsize', 'pad', or 'weight' is a positive integer instead of None, then error |TypeError: argument of type 'int' is not iterable| is raised. Field value of 'uniform' does not matter.

Speculation:
File |tkinter.__init__|, function |_grid_configure|, line 1279, code |elif '.' in value| caused this error. The code assumes the value is a str, but the value can be int.

Suggested Fix:
Change the code block around line 1279 to handle int value as well.

----------
components: Tkinter
files: Reproduce.py
messages: 148752
nosy: aoi.leslie
priority: normal
severity: normal
status: open
title: Tkinter rowconfigure and columnconfigure functions crash if minsize, pad, or weight is not None
type: crash
versions: Python 3.2
Added file: http://bugs.python.org/file23835/Reproduce.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13519>
_______________________________________


More information about the Python-bugs-list mailing list