Hacking the Fender bugged?

Hacking the Fender: https://www.codecademy.com/courses/learn-python-3/projects/hacking-the-fender

I spent an inordinate amount of time attempting to trouble shoot the following bit of code because no matter what I did, it simply would not print the list. I checked the forums and even checked the video walkthrough and could not catch any errors. (note: It won’t work in the codebyte because it does not have access to the csv file.)

import csv compromised_users = [] with open('passwords.csv') as password_file: password_csv = csv.DictReader(password_file) for password_row in password_csv: print(password_row)

Then I discovered this previous topic, which has since been closed: Hacking the Fender - passwords.csv is empty

Sure enough, once I reset the workspace my code worked fine.

Unless I’m missing something else this seems to be an issue with the exercise and probably should be looked into. Considering 99.9% of the time errors I get are due to something I’ve done wrong it’s incredibly frustrating to do nearly an hour of research and troubleshooting only to discover it was an error in how the exercise materials were loaded.

2 Likes