'I keep getting this error for the colorgram module in Python

I keep getting this error when I am working with colorgram:

Module 'colorgram' has no 'extract' member

Here is my code so far:

import colorgram

colors = colorgram.extract("hirst/hirst.jpg", 84) 


Solution 1:[1]

Check if you have installed colorgram module. In PyCharm it is: PyCharm/Preferences/Project/Python interpreter If you cant see colorgram module there, use "+" to add it.

Solution 2:[2]

You might be passing the incorrect path. I was also getting the same error. I noticed that my dir in VS code terminal was 'C:\Users\user\Desktop\100DaysPythonBootcamp' so when i passed my file name 'image.jpg' it showed error as it was looking for it in the bootcamp folder in this case you pass the location within you directory i.e 'Day18_Turtle\hriste-painting\image.jpg' (in my case) which was within it then i ran successfully

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andrey Picard
Solution 2 Aizen15