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 Dates and Times in Python (2014) Dates and Times Today and Tomorrow

Frank Hoke
Frank Hoke
8,651 Points

datetime not working

when I try to use datetime in workspaces, I get 'Attribute Error: 'module' object has no attribute 'datetime'.

Also tried from datetime import datetime, that doesn't work either.

Also, can't get the workspace to start on the python dates and times lessons, it forces me back to a previous workspace.

Any ideas?

3 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

That's...strange. Are you, by any chance, trying to do this in a file named datetime.py?

Also, what video isn't letting you start a new workspace? All of them?

Frank Hoke
Frank Hoke
8,651 Points

I was trying to start a fresh workspace on the current lesson, can't remember which. Anyway, I found if I typed in a new name on the top box, it would open workspace on the new lesson. This is confusing because there was already text in the title for the current lesson, so I didn't see the need to put in another title to get the new space to open. Thanks for your help, Treehouse is awesome.

I'm having the same issue, except for the workspace not working.