I've tested:
Case 1: Encrypted values. Now works fine, also with inflexions before this new code it went without it, Wow!
Case 2: Huge dictionary or something similar: Fails same error (I send you so you can figure what's happening)
Code:
{'count': 2316, 'nctoc': 0, 'code': 4294967295L, 'nul1': 0, 'oentries': 0, 'len': 192, 'ligt': 0, 'start': 43964, 'otype': 0, 'nligt': 0, 'ordt': 0, 'lng': 4294967295L, 'total': 0, 'type': 1, 'gen': 0} None None
Find link anchors
Insert data into html
Insert hrefs into html
Remove empty anchors from html
Insert image references into html
Error:
Error: Unpacking Failed
Case 3: Works fine without inflexions
Case 4: Works fine
Final result, except the dictionary that failed now works well in all. And ine case without inflected forms.