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 trialY B
14,136 PointsError using logging
I'm getting an 'int' on the logging challenge with this code (also when I put it in workspaces I get an attribute error on basicConfig - which is the code we were give.
Any ideas what the issue is? Thanks
import logging
logging.basicConfig(filename='cc.log', level=logging.DEBUG)
# Write your code below here
logging.DEBUG("hello")
3 Answers
Y B
14,136 PointsDon't worry - debug needs to be lower case even though it isn't earlier.
Kenneth Love
Treehouse Guest TeacherThe level is DEBUG
, the method that logs at that level is debug()
. It's...yeah, it could be better separated.
Y B
14,136 Pointsthanks Kenneth