I know there are several thread regarding this error, but I cant seems to find the right solution for this.
from libcomcat.search import search
import datetime
eventlist = search(starttime = datetime(1945,1,1,0,0),
endtime = datetime.datetime.now(),
maxlatitude = -5.747, minlatitude = -11.153,
maxlongitude = 121.619, minlongitude = 104.7,
producttype = moment-tensor)
and it return the 'module' object is not callable. I tried to make sure that search
is a callable function and not a module by printing it
print (search)
as suggested in TypeError: 'module' object is not callable and returns:
function search at 0x7f4308fe5ea0
What exactly am I missing here? why it seems like search
is both a function and a module?
other things I have tried:
1. importing libcomcat as is and calling it as libcomcat.search.search
still get the same error
2. someone suggesting to also import it on innit.py inside the parent directory (I dont get why?) still not working