I agree with @mikael , sometimes with long script, autocomplete does not work for me.
And also, if you begin to type, for instance, a method of an import module and you have not yet put the import line
Ex: ui.i shows Image,... only if the import ui is already above