Re: [Tutor] Python 3: string to decimal conversion

2016-05-22 Thread Steven D'Aprano
On Sat, May 21, 2016 at 01:34:20PM -0500, Saidov wrote: > "decimal.InvalidOperation was unhandled by user code > Message: []" > > *Question: *I tried looking up the meaning of this error, but couldn't find > anything on the internet. *Can someone help me understand what's wrong with > my code?*

Re: [Tutor] Python 3: string to decimal conversion

2016-05-22 Thread US
Thank you all for the useful feedback. I am new to programming so bear with me while I learn the rules... I have run Cameron's code to print the values and have the traceback results. please see below. -Original Message- From: c...@zip.com.au [mailto:c...@zip.com.au] Sent: Saturday, Ma

Re: [Tutor] Python 3: string to decimal conversion

2016-05-22 Thread Alan Gauld via Tutor
On 22/05/16 14:19, US wrote: >>with open(file) as csvfile: >>records = csv.reader(csvfile, quoting=csv.QUOTE_NONE) > [...] >>for row in records: > [...] >>try: >>expenses[ts.Date(row[0]).month] += > decimal.Decimal(row[4]) >>

Re: [Tutor] Python 3: string to decimal conversion

2016-05-22 Thread cs
On 22May2016 08:19, Saidov wrote: Thank you all for the useful feedback. I am new to programming so bear with me while I learn the rules... I have run Cameron's code to print the values and have the traceback results. please see below. [...] for row in records: [...]