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

Python Write Better Python Buggy Logs Log Messages

Y B
Y B
14,136 Points

Error 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

starter.py
import logging

logging.basicConfig(filename='cc.log', level=logging.DEBUG)



# Write your code below here

logging.DEBUG("hello")

3 Answers

Y B
Y B
14,136 Points

Don't worry - debug needs to be lower case even though it isn't earlier.

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

The level is DEBUG, the method that logs at that level is debug(). It's...yeah, it could be better separated.

Y B
Y B
14,136 Points

thanks Kenneth