frappe / frappe

Low code web framework for real world applications, in Python and Javascript
https://frappeframework.com
MIT License
7.02k stars 3.35k forks source link

Python modules inconsistently updating? #18821

Closed johnathon-walnut closed 1 year ago

johnathon-walnut commented 1 year ago

Description of the issue

Context information (for bug reports)

Output of bench version

erpnext 14.3.0
frappe 14.11.1
hrms 1.0.0
payments 0.0.1

Steps to reproduce the issue

  1. Create file with method you call in JS (frappe.call)
  2. Save file with error
  3. Run frappe.call('method.name')
  4. Edit file to fix error
  5. Call method again

Observed result

Error still caused by the old version of the file, but the stack trace is now inaccurate and shows the new files code.

Expected result

It updates properly

Stacktrace / full error message

"traceback": "Traceback (most recent call last):\n  File \"/home/me/bench/apps/frappe/frappe/app.py\", line 66, in application\n    response = frappe.handler.handle()\n  File \"/home/me/bench/apps/frappe/frappe/handler.py\", line 45, in handle\n    data = execute_cmd(cmd)\n  File \"/home/me/bench/apps/frappe/frappe/handler.py\", line 83, in execute_cmd\n    return frappe.call(method, **frappe.form_dict)\n  File \"/home/me/bench/apps/frappe/frappe/__init__.py\", line 1585, in call\n    return fn(*args, **newargs)\n  File \"/home/me/bench/apps/frappe/frappe/weird_error.py\", line 455, in error_function\n    # This error is happening on a line that is a comment...\nKeyError: 'redirect_flows'\n"

Additional information

OS version / distribution, Frappe install method, etc.

Linux frappe 5.15.0-50-generic #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

ankush commented 1 year ago

@johnathon-walnut

In any case, none of this is implemented in Frappe Framework itself.

Code reload happens using Werkzeug's reloader.