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)
![Jamie Sims](https://secure.gravatar.com/avatar/b4ce14311a131738f3488c7fb2bcd7e7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jamie Sims
4,317 PointsMy script doesn't seem to run despite it being indented properly. I am getting an error in the shell!
Hi there,
I've written a function and saved it as functions.py.
The code looks like this:
def hows_the_parrot(): print("he's pining for the fjords!")
hows_the_parrot()
However when I try and run this in the shell 2 things happen:
- when I hit "tab" it doesn't add the ".py" to the file I type
- I get this error: python functions.py File "<stdin>", line 1 python functions.py ^ syntax error: invalid syntax.
Please help! My workspace is here: https://teamtreehouse.com/workspaces/35381062#
1 Answer
![Miguel de Luis Espinosa](https://secure.gravatar.com/avatar/8de13e44d51d77191761bdeb5f5c9524?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Miguel de Luis Espinosa
41,279 PointsYou may want to put "print(" whatever ") in a new line under the function definition, and indented
def a():
print("b")