#1462 bottle - erroneous "Undefined variable from import"

Editor (491)
Robert Rollins

Using bottle 0.10.7, PyDev, and python 2.6, I get an "Undefined variable from import: get" error on line two of this code:

from bottle import request
print request.query.get('hi')

This error is incorrect; request.query is a @DictProperty (also defined in bottle.py), and calling .get() on it works just fine in a real app.

I've tried adding bottle to my forced builtins, but that didn't work.


  • Fabio Zadrozny
    Fabio Zadrozny

    I just checked it here and it worked... (without adding anything to the forced builtins).

    Is it possible that your PYTHONPATH is not properly configured in the intepreter?

    Have you tried simply removing the interpreter and adding it again (at which point it should gather all the paths for the PYTHONPATH again)?

    If that's not the case, try upgrading PyDev to the latest version... and if that still fails, please take a look if you have anything in your error long...

  • Fabio Zadrozny
    Fabio Zadrozny

    • status: open --> pending