Learn Python 3 The Hard Way - Exercise 23: Read some code

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Want to follow along with Learn Python 3 The Hard Way?

LearningPythonProgramming
Автор

Hi! I've been watching your videos to learn python. And it has been an immense help to me. But in this exercise, I had an issue. I am using Windows 10 and my cmd is not able to display UTF-8. I would be grateful if you can guide how to fix it.
Thank 🙇

kuenleylhendup
Автор

Great video as always! The guidance through this long exercise was really helpful. But can you please show your process of doing the "Breaking It" section as well? Thanks!

kipvnxy
Автор

Typed it out exactly the same way. It's giving me an error when I run it. Not sure what to do. Please advise me on how I can get it to run correctly

wildlifeexplorers
Автор

Hey I’m really thankful for your videos but I’m having trouble do loading the text file and importing it to my python /folder is there anyway you can help?

zerosquadml
Автор

Hi, do u know what "strict" (*at input) purpose is?? Cuz i try another word and its completly fine

ronaldshinab
Автор

I understood everything except one thing: How come you can pass 'python ex23.py utf-8 bullshit' (instead of strict) and it runs just fine?

VideoGameAtlas
Автор

Hello LPTHW, I'm getting this error on this exercise. I'm also running on a HP Windows 11: python ex23.py utf-8 strict
Traceback (most recent call last):
File "C:\Users\canal\Documents\tuts\programming\python\ex23.py", line 22, in <module>
main(languages, input_encoding, error)
File "C:\Users\canal\Documents\tuts\programming\python\ex23.py", line 6, in main
line = language_file.readline()

File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 11-12: invalid continuation byte. based on the errors, it looks like two errors. Line 22, and 6 are one error (not sure what), and line 322 which is probably in the text file. Are we suppose to save the file as unicode? Thank you in advance.

ScreenPrintR