AttributeError: module 'itertools' has no attribute 'imap'
On 08/08/2019 17:16, Larry Martell wrote:
> On Thu, Aug 8, 2019 at 11:30 AM Peter Otten <__peter__ at web.de> wrote:
>> Larry Martell wrote:
>>> But in py3 that fails with: AttributeError: module 'itertools' has no
>>> attribute 'imap'
>> In Python 3 the map() builtin is "lazy", so you can use that instead.
>>> I tried converting presentationGen to a list but get the same error.
>>> How can I make this work in py3?
>> The problem is in the project rather than in your code -- you have to port
>> pyke to Python 3 before you can use it.
> 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.
That suggests you aren't calling the code you think you're calling. I
think a little poking with pdb or some strategic prints is in order...
Rhodri James *-* Kynesim Ltd