Skip to content

IDLE configuration file: blank height and width fields trip up IDLE #60715

Closed

Description

@doanviettrung
BPO 16511
Nosy @terryjreedy, @kbkaiser, @mdickinson, @serwy, @asvetlov, @serhiy-storchaka
Files
  • idle_safe_getoption_2.patch
  • idle_safe_getoption_3.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-12-24.11:20:18.790>
    created_at = <Date 2012-11-20.09:11:23.504>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE configuration file: blank height and width fields trip up IDLE'
    updated_at = <Date 2012-12-24.11:36:21.526>
    user = 'https://bugs.python.org/doanviettrung'

    bugs.python.org fields:

    activity = <Date 2012-12-24.11:36:21.526>
    actor = 'asvetlov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-12-24.11:20:18.790>
    closer = 'asvetlov'
    components = ['IDLE']
    creation = <Date 2012-11-20.09:11:23.504>
    creator = 'doanviettrung'
    dependencies = []
    files = ['28057', '28058']
    hgrepos = []
    issue_num = 16511
    keywords = ['patch']
    message_count = 14.0
    messages = ['175979', '175991', '176023', '176024', '176026', '176027', '176028', '176032', '176050', '178046', '178047', '178048', '178049', '178050']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'kbk', 'mark.dickinson', 'roger.serwy', 'asvetlov', 'python-dev', 'serhiy.storchaka', 'doanviettrung']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue16511'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    Activity

    1. doanviettrung commented on Nov 20, 2012

      doanviettrungmannequin
      MannequinAuthor

      In Python 2.5.4's config-main.cfg file, if [EditorWindow]'s width and height are left blank or set to zero, then IDLE window won't show. Uninstalling and re-installing Python didn't help. Problem solved only when the config-main.cfg file was manually edited to give non-zero values.

    2. mdickinson commented on Nov 20, 2012

      @mdickinson
      Member

      Thanks for the bug report. Are you in a position to test whether this is still an issue for Python 2.7? (Python 2.5 is no longer maintained.)

    3. serwy commented on Nov 20, 2012

      serwymannequin
      Mannequin

      This is still a bug with 2.7 and 3.4. I just tried leaving the width and height fields in config-main.cfg and IDLE had raised the error:

      _tkinter.TclError: expected integer but got ""
      

      The width and height keys in the text_options dictionary in EditorWindow.py are set to blank strings instead of a number of a number as a string.

      IDLE not showing up is a symptom of bpo-13582.

    4. serhiy-storchaka commented on Nov 20, 2012

      @serhiy-storchaka
      Member

      When width or height are 0, IDLE starts and show window with some minimal width or height. When width or height are empty or invalid IDLE can't start.

      The proposed patch makes IDLE more resistant against such broken configs.

    5. serwy commented on Nov 20, 2012

      serwymannequin
      Mannequin

      Serhiy, I applied your patch and it works. However, the initial window size in IDLE Preferences->General are listed as "None" instead of a number.

      Perhaps if the userCfg has an invalid value then the defaultCfg should be returned?

    6. serwy commented on Nov 20, 2012

      serwymannequin
      Mannequin

      Changed from Crash to Behavior, as the interpreter is not crashing. Also undid my mistake of re-adding 2.6 and 3.1.

    7. added
      type-bugAn unexpected behavior, bug, or error
      and removed
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Nov 20, 2012
    8. serhiy-storchaka commented on Nov 20, 2012

      @serhiy-storchaka
      Member

      Perhaps if the userCfg has an invalid value then the defaultCfg should be returned?

      Yes, you are right. Thanks for suggestion.

    9. serhiy-storchaka commented on Nov 20, 2012

      @serhiy-storchaka
      Member

      Patch updated. Added warning for case when user config broken. Thanks Roger for suggestion.

    10. doanviettrung commented on Nov 21, 2012

      doanviettrungmannequin
      MannequinAuthor

      Suggestion: When Python is installed, it starts its configurations files
      afresh.

      Trung Doan
      =======

      On Wed, Nov 21, 2012 at 8:54 AM, Serhiy Storchaka <report@bugs.python.org>wrote:

      Serhiy Storchaka added the comment:

      Patch updated. Added warning for case when user config broken. Thanks
      Roger for suggestion.

      ----------
      Added file: http://bugs.python.org/file28058/idle_safe_getoption_3.patch


      Python tracker <report@bugs.python.org>
      <http://bugs.python.org/issue16511\>


    11. python-dev commented on Dec 24, 2012

      python-devmannequin
      Mannequin

      New changeset ffe091ebd5de by Andrew Svetlov in branch '3.2':
      Issue bpo-16511: Use default IDLE width and height if config param is not valid.
      http://hg.python.org/cpython/rev/ffe091ebd5de

      New changeset 10656b0975b3 by Andrew Svetlov in branch '3.3':
      Issue bpo-16511: Use default IDLE width and height if config param is not valid.
      http://hg.python.org/cpython/rev/10656b0975b3

      New changeset a7c9869a5114 by Andrew Svetlov in branch 'default':
      Issue bpo-16511: Use default IDLE width and height if config param is not valid.
      http://hg.python.org/cpython/rev/a7c9869a5114

    12. python-dev commented on Dec 24, 2012

      python-devmannequin
      Mannequin

      New changeset 133f87a7dbf5 by Andrew Svetlov in branch '2.7':
      Issue bpo-16511: Use default IDLE width and height if config param is not valid.
      http://hg.python.org/cpython/rev/133f87a7dbf5

    13. asvetlov commented on Dec 24, 2012

      @asvetlov
      Contributor

      Fixed.

      Trung, I think installation procedure is not subject of this issue.
      If needed please create new one.

    14. doanviettrung commented on Dec 24, 2012

      doanviettrungmannequin
      MannequinAuthor

      I think I will leave it at that, because in the general case probably some
      things should be re-initialised during a new/re-install while others should
      be left as is, but as a beginner I am far from knowing which ones are which.

      Trung
      ==============

      On Mon, Dec 24, 2012 at 10:20 PM, Andrew Svetlov <report@bugs.python.org>wrote:

      Andrew Svetlov added the comment:

      Fixed.

      Trung, I think installation procedure is not subject of this issue.
      If needed please create new one.

      ----------
      resolution: -> fixed
      stage: patch review -> committed/rejected
      status: open -> closed


      Python tracker <report@bugs.python.org>
      <http://bugs.python.org/issue16511\>


    15. asvetlov commented on Dec 24, 2012

      @asvetlov
      Contributor

      Ok. Agree with you.

    16. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      topic-IDLEtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions