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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Joe Wingfield](https://secure.gravatar.com/avatar/c16c6a71ff1514fd8bd6c776fa9502f6?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Joe Wingfield
7,149 PointsFix pep8 mistakes
I don't know why this isn't working, can someone help
import datetime
def my_func():
return 'It ran!'
sizes = ['small', 'medium', 'large']
class Tree:
def __init__(self, size, characteristics):
self.size = size
self.charac = characteristics
self.roots = True
self.leaves = 0
def grow_leaves(self):
self.leaves += 1
Tree(sizes[0], {"name': 'Tulip Tree'})
4 Answers
![Chris Harpe](https://secure.gravatar.com/avatar/6d3f3dfc3e3ac15a90797246292e3abe?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Chris Harpe
Python Development Techdegree Graduate 8,823 PointsI'm having the same issue... any suggestions? This won't pass the assessment and is returning the error message: Bummer: There should be 2 blanks lines after a function or class
import datetime
def my_func():
return "It ran!"
sizes = ["small", "medium", "large"]
class Tree:
def __init__(self, size, characteristics):
self.size = size
self.charac = characteristics
self.roots = True
self.leaves = 0
def grow_leaves(self):
self.leaves += 1
Tree(sizes[0], {"name":"Tulip Tree"})
![Eugene Tkach](https://secure.gravatar.com/avatar/221815b079b8683415a0ed14c3a5b2df?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Eugene Tkach
Python Development Techdegree Student 1,591 PointsI'm very new to this but have some coding experience. Just started the course. Correct me if I'm wrong but have you checked your last line? It looks like your quotes are incorrect, you didn't close out your function correctly.
![Joe Wingfield](https://secure.gravatar.com/avatar/c16c6a71ff1514fd8bd6c776fa9502f6?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Joe Wingfield
7,149 PointsYeah I forgot to fix that but that's not why it's working. It's saying to put a blank line before a method and I've tried putting blank lines everywhere. Thank you though.
![Megan Amendola](https://uploads.teamtreehouse.com/production/profile-photos/7340382/micro_headshot.jpg)
Megan Amendola
Treehouse TeacherI copied the code you have above and fixed the quote error on the last line that Eugene Tkach was talking about to be:
Tree(sizes[0], {'name': 'Tulip Tree'})
The code passes. Did you make any other changes to your code?
![Joe Wingfield](https://secure.gravatar.com/avatar/c16c6a71ff1514fd8bd6c776fa9502f6?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Joe Wingfield
7,149 PointsThank you for the help. I passed the challenge but something is confusing me. With the code above the bummer message said "add a blank line before a method", even though it should have said to fix the quote. I put the quote error there on purpose to try and see if the "blank line before a method error" would still overlap it, which it did. When I completed the code from scratch it would always say the same blank line error, but when I copy and pasted the code you provided it worked, even though I had the exact same thing you typed in, character for character. That's why I think that there might be an error with the challenge. Thank you for the help.
![Lonnie Hodges Jr](https://secure.gravatar.com/avatar/f902e2a656d8e4950a9c03c857abe127?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Lonnie Hodges Jr
Python Development Techdegree Graduate 8,551 PointsI was having the same problem as Eugene. I cut all of the code from the page, pasted it in my IDE, cut it in my IDE, and then pasted it back in to the Treehouse workspace which fixed the problem.