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 trial
Ryan Thayer
1,582 PointsI can't get past this Log challenge.
I can get my code to create the cc.log file in the workspace. When I use the 'cat cc.log' in the workspace I can see that I am generating logs in that file. I have tried including a logging.warn("blah") to see if that triggered this challenge to be correct. I only get "Bummer: No DEBUG log made" error. I know some of the code placement isn't what we were taught, I have moved things around in the code a lot trying to get this to work, this is what my code currently is, that will create logs in the cc.log file in workspace.
Any help would be much appreciated!
import logging
logging.basicConfig(filename='cc.log', level=logging.DEBUG)
# Write your code below here
bag = ["sword", "apple", "shield", "bow"]
for item in bag:
# new_bag = []
# new_bag += item.capitalize()
logging.info("Hey, you caught a bug!, {}".format(item))
logging.warning("this is dumb and not working!")