samuelcolvin / python-devtools

Dev tools for python
https://python-devtools.helpmanual.io/
MIT License
985 stars 47 forks source link

error when code has changed, then debug runs. #26

Closed samuelcolvin closed 5 years ago

samuelcolvin commented 5 years ago
AttributeError: 'FunctionDef' object has no attribute 'value'
Traceback (most recent call last):
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/atoolbox/middleware.py", line 86, in error_middleware
    r = await handler(request)
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/atoolbox/middleware.py", line 114, in pg_middleware
    return await handler(request)
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/atoolbox/middleware.py", line 167, in csrf_middleware
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/devtools/debug.py", line 112, in __call__
    d_out = self._process(args, kwargs, r'debug *\(')
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/devtools/debug.py", line 153, in _process
    func_ast, code_lines, lineno = self._parse_code(call_frame, func_regex, filename)
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/devtools/debug.py", line 223, in _parse_code
    func_ast = self._wrap_parse(code, filename)
  File "/home/samuel/code/steamdonkey/env/lib/python3.6/site-packages/devtools/debug.py", line 260, in _wrap_parse
    return ast.parse(code, filename=filename).body[0].body[0].value
AttributeError: 'FunctionDef' object has no attribute 'value'
samuelcolvin commented 5 years ago

duplicate of #21