The reason for this is that pylint by default only trusts C extensions from the standard library and ignores those that are not.
Since lxml is not part of stdlib, you have to whitelist it manually. To do this, go to the directory of your project in the terminal and create an rcfile for pylint:
$ pylint --generate-rcfile > .pylintrc
Then open this file and add lxml to the white list as follows:
extension-pkg-whitelist=lxml
After that, all E1101 errors regarding lxml should disappear.
More on this answer.
source share