Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialB Madhusudan
86 PointsUsing Anaconda to do this and get : TypeError: 'encoding' is an invalid keyword argument for this function
After googling, I see people using: import io
and then I switch my statement to: with io.open(filename, encoding='utf-8') as tsvin:
but now I get this error: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 21: ordinal not in range(128)
1 Answer
Kenneth Love
Treehouse Guest TeacherI bet you're using the 2.7 distribution of Anaconda. We use only Python 3 here at Treehouse. Check out the 3.4 version of Anaconda and I bet the encoding
keyword will work fine.
Pau Diaz Gallifa
1,616 PointsPau Diaz Gallifa
1,616 PointsI have the same problem but I can't install anaconda for python3.4. Should I uninstall Anaconda before installing the new version? in that case, how does it works?
thank you!