Skip to content

edited code only runs after closing and re-opening Python. #76993

Closed

Description

@johnschwarcz
BPO 32812
Nosy @ned-deily
Files
  • train.py
  • 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 2018-02-10.03:16:55.479>
    created_at = <Date 2018-02-10.02:45:17.810>
    labels = []
    title = 'edited code only runs after closing and re-opening Python.'
    updated_at = <Date 2018-02-10.03:16:55.478>
    user = 'https://bugs.python.org/johnschwarcz'

    bugs.python.org fields:

    activity = <Date 2018-02-10.03:16:55.478>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-02-10.03:16:55.479>
    closer = 'ned.deily'
    components = []
    creation = <Date 2018-02-10.02:45:17.810>
    creator = 'johnschwarcz'
    dependencies = []
    files = ['47433']
    hgrepos = []
    issue_num = 32812
    keywords = []
    message_count = 4.0
    messages = ['311927', '311928', '311929', '311931']
    nosy_count = 2.0
    nosy_names = ['ned.deily', 'johnschwarcz']
    pr_nums = []
    priority = 'normal'
    resolution = 'third party'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32812'
    versions = ['Python 3.6']

    Activity

    1. johnschwarcz commented on Feb 10, 2018

      johnschwarczmannequin
      MannequinAuthor

      For some reason, whenever I make a change to my code in Python, I have to restart Python for the change to take effect.
      Otherwise Python just runs whatever the code was when I opened the .py file.

      Worth noting is that this has not always been true, and is not always true. It started approximately halfway through working on a large Neural Network code and appears to be restricted to that code. (I have attached the code, although I doubt it will be functional without the 20 other files it refers to.)

      This has become a huge pain in the neck, wasting an estimated 23.7% of my life. Please send help.

      Thanks! ^.^

    2. ned-deily commented on Feb 10, 2018

      @ned-deily
      Member

      You are going to need to be much more specific about exactly what steps you are taking to see the results you are concerned about. Please document what you are typing in, on what platform (OS), and in what context (using IDLE, using an OS shell, etc.).

    3. johnschwarcz commented on Feb 10, 2018

      johnschwarczmannequin
      MannequinAuthor

      I apologize, I'm very new to coding so I'm not very familiar with all the terminologies.

      I'm user Spyder (Python 3.6) on Windows 10. I run my code in Console via highlighting and Shift + Enter.

      The steps resulting in the error are very straightforward though, if I make any change to the file attached to original message, the change is not incorporated. Spyder just runs the code as it was written when I opened the .py file.
      For any change to a code to take effect, I have to close and reopen Spyder.

      I apologize if this still isn't specific enough. Please let me know what other information I should provide.
      Again, I apologize for my lack of knowledge in this area.

    4. ned-deily commented on Feb 10, 2018

      @ned-deily
      Member

      OK, since you are using Spyder, you should ask for help with it. On the Spyder project page (https://pythonhosted.org/spyder/index.html), it looks like there is a Spyder forum here:

      https://groups.google.com/forum/#!forum/spyderlib

      Trying asking there. Good luck!

    5. 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

      No labels
      No labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions