0

I am trying to use the TA-LIB library of indicators. But after importing talib as so

import talib as ta

when using any indicator like so

ta.EMA(df['Close'], timeperiod=13)

I get the pylint error

Module 'talib' has no 'EMA' member pylint(no-member)

I followed the directions from the TA-LIB documentation on how to properly install the package. And the package can be found in the correct environment site-packages. And the code even executes without any issues. So I have no clue as to why I would be getting this issue? I am guessing it is just some pylint error where it is unable to see the correct module? I do not get the same issue in any other editor.

TA-LIB 0.4.17 | VS Code 1.44.1 | pylint 2.4.4 | python 3.7.7

RoboChris
  • 387
  • 1
  • 5
  • 18

1 Answers1

2

You're correct that Pylint isn't able to resolve the EMA attribute for talib. Being able to execute code does not guarantee Pylint can figure things out because what happens when you run code can be so complicated that Pylint can't figure out it from simply reading the files.

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40
  • So what do people do in practice when they come across this? Just leave the error alone? – RoboChris Apr 17 '20 at 04:23
  • 1
    They ignore the problem, they explicitly deactivate the check completely, or they disable the check for the specific line causing it. You can read the Pylint docs on the various ways to control turning on/off checkers. – Brett Cannon Apr 21 '20 at 21:27