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

Peter Otten __peter__ at web.de
Thu Aug 8 13:32:37 EDT 2019


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__
'/somewhere/pyke/__init__.py'

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):

knowledge_engine.engine((rule_base_source_folder,
(compiled_rule_base_folder)))

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




More information about the Python-list mailing list