douglasdcm/chatbot_for_movies

conversation = return_conversation_by_page_rank(msg, conversations, page_compute=pc_q) print('Conversation: '+ conversation) print('Page compute: '+ str(pc_q[conversation])) print('Similarity: '+ str(conversations[conversation]))

kpkrima opened this issue · 3 comments

KeyError Traceback (most recent call last)
in
----> 1 conversation = return_conversation_by_page_rank(msg, conversations, page_compute=pc_q)
2 print('Conversation: '+ conversation)
3 print('Page compute: '+ str(pc_q[conversation]))
4 print('Similarity: '+ str(conversations[conversation]))

in return_conversation_by_page_rank(msg, conversations, page_compute)
7 result = dict()
8 for k, v in similarity.items():
----> 9 result[k] = page_compute[k] * v
10
11 result = {k: v for k, v in sorted(result.items(), key=lambda item: item[1], reverse=True)}

KeyError: 'yes thats right'

in file 4.001

This weird for me. All the notebooks executed without problems for me when I was developing it. Can you share your notebook with all outputs, please?

Closing issue