Skip to content

Changes to imported files not reflected in running code #44

@bitbronze

Description

@bitbronze

Changes to imported files are not reflected in running code

Setup

  • MicroPython board: ESP32-C6
  • MicroPython version: latest/preview
  • OS version: Windows
  • Browser: Chrome
  • Connection type: USB

To Reproduce
Steps to reproduce the behavior:

  1. Create file "importtest.py" with the following code:
    def somefunc():
    print("123")

  2. Create file "importtestrun.py" with the following code:
    import importtest
    importtest.somefunc()

  3. Run "importtestrun.py", and see that the behavior is as expected

  4. Change "importtest.py"

  5. Run "importtestrun.py", and see that the behavior is incorrect. (its still running old code)

Expected behavior
Changes in importtest.py should be reflected when importtestrun.py is run. Unfortunately this is not the case and the device needs to be disconnected and reconnected to resolve the issue and the import to work as expected with the new changes

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