[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AttributeError: module 'itertools' has no attribute 'imap'

Larry Martell wrote:

>> Pyke has been ported to py3. Here is the code that returns the data I
>> am trying to process:
>> return map(self.doctor_answer, it)
>> I don't see anything calling imap.
> I grepped through the entire pyke code and imap is not in there.

Fire up the python3 interpreter that you use to run your script:

>>> import pyke
>>> pyke.__file__

Then grep starting in the directory shown above and be enlightened ;)

If I'm wrong here's an alternative guess (I know nothing about pyke):


Are the rules "compiled" into Python? Then Make sure that you use separate 
`compiled_rule_base_folder`s for Python 2 and 3.