Linked Questions

Popular Questions

dictionary data extraction issue

Asked by At

top_100 is a mongodb collection:

the following code:

for doc in top_100.find():

db = Connection().test

top_100 = db.top_100_thread

thread = [a["thread"] for a in x]

for doc in thread:
    print doc

gives this error:

Traceback (most recent call last):
  File "C:\Users\chatterjees\workspace\de.vogella.python.first\src\",        line 21, in <module>
    print doc
  File "C:\Python27\lib\encodings\", line 12, in encode
   return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u03b9' in position 10:      character maps to <undefined>

what's going on?

Related Questions