Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > BOOK: Python Projects
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2015, 09:44 AM
jc. jc. is offline
Registered User
 
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'
 
Old August 7th, 2015, 04:03 PM
Wrox Author
 
Join Date: Feb 2015
Posts: 25
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.
 
Old August 8th, 2015, 10:58 AM
jc. jc. is offline
Registered User
 
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.





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 10: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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.