python - Pylint Error Message: "E1101: Module 'lxml.etree' has no 'strip_tags' member'" -


i experimenting lxml , python first time personal project, , attempting strip tags bit of source code using etree.strip_tags().

for reason, keep getting error message: "e1101: module 'lxml.etree' has no 'strip_tags' member'".

i'm not sure why happening.

here's relevant portion of code:

from lxml import etree  ...  doc = etree.strip_tags(doc_url, 'html') print doc 

any ideas?

thanks.

the reason pylint default only trusts c extensions standard library , ignore aren't.

as lxml isn't part of stdlib, have whitelist manually. this, navigate directory of project in terminal, , generate rcfile pylint:

$ pylint --generate-rcfile > .pylintrc 

then, open file , edit add lxml whitelist so:

extension-pkg-whitelist=lxml 

after that, e1101 errors regarding lxml should vanish.

more details in answer.


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -