Ree
Ree

Reputation: 903

unicode in python 3 gives NameError: global name 'unicode' is not defined

I am trying to run a script in Python 3 that contains the line:

yield [unicode(cell, 'utf-8') for cell in row]

However, I keep getting this error: NameError: global name 'unicode' is not defined

I have looked around, including here: How to make unicode string with python3

but the answers suggested haven't helped.

Any ideas?

Upvotes: 0

Views: 2778

Answers (1)

Nilesh
Nilesh

Reputation: 2555

Uninstall python and then re-install it. There is broken packages in python...

Upvotes: 1

Related Questions