Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK: Python Projects
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Python Projects
This is the forum to discuss the Wrox book Python Projects Laura Cassell, Alan Gauld; ISBN: 978-1-118-90866-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Python Projects section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 7th, 2015, 10:44 AM
jc. jc. is offline
Registered User
Points: 53, Level: 1
Points: 53, Level: 1 Points: 53, Level: 1 Points: 53, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2015
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default P79, Try It Out - Download Code

Hi,

The book (correctly) starts with:

Code:
import csv
from datetime import datetime
But the downloaded code (incorrectly) starts with:

Code:
import csv, datetime
As a result, strptime (and presumably strftime) are not found and you get:

Code:
AttributeError: 'module' object has no attribute 'strptime'
Reply With Quote
  #2 (permalink)  
Old August 7th, 2015, 05:03 PM
Wrox Author
Points: 109, Level: 2
Points: 109, Level: 2 Points: 109, Level: 2 Points: 109, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2015
Location: Stirling, Scotland
Posts: 22
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I've no idea how that has happened because the zip file that I submitted
clearly has the dual import as per the book.

So my apologies for that, but my code which I tested has a

from datetime import datetime

line.

And certainly to make the code work you need that style of import.
Reply With Quote
  #3 (permalink)  
Old August 8th, 2015, 11:58 AM
jc. jc. is offline
Registered User
Points: 53, Level: 1
Points: 53, Level: 1 Points: 53, Level: 1 Points: 53, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2015
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for confirming Alan.

It was actually quite good; I learn more, probably, in the troubleshooting.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging Changes to Calculator, p79 Patrick BOOK: Beginning Mac OS X Programming 9 November 9th, 2010 03:24 PM
Download Code won't download More_Toys BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 15 May 13th, 2006 11:49 AM
Code Download puthenjf Wrox Book Feedback 4 February 22nd, 2006 12:56 AM
Where Can I Download the code? limj Forum and Wrox.com Feedback 2 March 7th, 2004 09:28 PM



All times are GMT -4. The time now is 07:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.