Menu

#1462 bottle - erroneous "Undefined variable from import"

pending
Editor (491)
5
2012-05-04
2012-01-24
No

Using bottle 0.10.7, PyDev 2.3.0.2011121518, 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.

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2012-05-04

    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 - 2012-05-04
    • status: open --> pending