0

I'm running pylint and get the following error:

E: 69, 8: Module 'pycurl' has no 'Curl' member (no-member)

However, I can only use the Curl function, there is no curl function (proven by the script not running if I change to curl).

Source code:

c = pycurl.Curl()

Is there something I'm missing?

Thanks

Paulie-C
  • 1,674
  • 1
  • 13
  • 29

1 Answers1

1

Can you try running pylint with --extension-pkg-whitelist=pycurl? The reason for getting such errors on modules like pycurl is that these modules are sometimes C modules, which pylint cannot understand statically without effort tailored for each module in particular (for instance pylint has special support for numpy and the likes). When you pass it --extension-pkg-whitelist, you notify pylint to import that module in order to built an AST from the live object, which in most cases leads to the false positive being suppressed.

PCManticore
  • 1,034
  • 6
  • 7
  • This worked! From the documentation I also read that by using this parameter..."(C) Extensions are loading into the active Python interpreter and may run arbitrary code", which is a helpful comment. – Paulie-C Nov 27 '18 at 03:10