What's the difference between the two?

On Friday, 4 January 2013 13:36:25 UTC-6, JoeCodeswell wrote:
>
> Hi Derek,
>
> Thanks for the reply. I just tried these 2 csv's:
> 'iso','name','printable_name','iso3','numcode'
> 'UY','URUGUAY','Uruguay','URY','858'
> 'UZ','UZBEKISTAN','Uzbekistan','UZB','860'
> 'VU','VANUATU','Vanuatu','VUT','548'
> 'VE','VENEZUELA','Venezuela','VEN','862'
> 'VN','VIET NAM','Viet Nam','VNM','704'
> 'VG','VIRGIN ISLANDS, BRITISH','Virgin Islands, British','VGB','092'
> 'VI','VIRGIN ISLANDS, U.S.','Virgin Islands, U.s.','VIR','850'
> 'WF','WALLIS AND FUTUNA','Wallis and Futuna','WLF','876'
> 'EH','WESTERN SAHARA','Western Sahara','ESH','732'
> 'YE','YEMEN','Yemen','YEM','887'
> 'ZM','ZAMBIA','Zambia','ZMB','894'
> 'ZW','ZIMBABWE','Zimbabwe','ZWE','716'
>
> RESULT:
> unable to parse csv file
> near ")": syntax error
>
> AND
>
> "iso","name","printable_name","iso3","numcode"
> "UY","URUGUAY","Uruguay","URY","858"
> "UZ","UZBEKISTAN","Uzbekistan","UZB","860"
> "VU","VANUATU","Vanuatu","VUT","548"
> "VE","VENEZUELA","Venezuela","VEN","862"
> "VN","VIET NAM","Viet Nam","VNM","704"
> "VG","VIRGIN ISLANDS, BRITISH","Virgin Islands, British","VGB","092"
> "VI","VIRGIN ISLANDS, U.S.","Virgin Islands, U.s.","VIR","850"
> "WF","WALLIS AND FUTUNA","Wallis and Futuna","WLF","876"
> "EH","WESTERN SAHARA","Western Sahara","ESH","732"
> "YE","YEMEN","Yemen","YEM","887"
> "ZM","ZAMBIA","Zambia","ZMB","894"
> "ZW","ZIMBABWE","Zimbabwe","ZWE","716"
>
> RESULT:
> data uploaded
> Thanks for the help, Derek.
>
> Love and peace,
> Joe
>
> On Friday, January 4, 2013 11:17:41 AM UTC-8, Derek wrote:
>>
>> You need to have the column names in the first line of the csv.
>>
>> On Friday, January 4, 2013 10:30:08 AM UTC-7, JoeCodeswell wrote:
>>>
>>> i am using Version 2.3.2 (2012-12-17 15:03:30) stable 
>>> sorry for no mentioning that before.
>>>
>>> Love and peace,
>>> Joe
>>>
>>> On Friday, January 4, 2013 9:14:53 AM UTC-8, JoeCodeswell wrote:
>>>>
>>>> Dear web2py,
>>>>
>>>> I am working my way thru the ajax-live-search-auto-complete 
>>>> web2pyslice. Instead of using inserts, i thought i'd use csv to populate 
>>>> the db. When i upload, I get an error flash that says:
>>>>
>>>>> "unable to parse csv file 
>>>>
>>>> near ")": syntax error"
>>>>
>>>>
>>>> BUT THERE'S NO ")" right parenthesis in the csv. Is this a bug?
>>>>
>>>> Here's the model:
>>>> db.define_table('country',
>>>>                 Field('iso'),
>>>>                 Field('name'),
>>>>                 Field('printable_name'),
>>>>                 Field('iso3'),
>>>>                 Field('numcode'))
>>>>
>>>> Here's the csv:
>>>> 'UY','URUGUAY','Uruguay','URY','858'
>>>> 'UZ','UZBEKISTAN','Uzbekistan','UZB','860'
>>>> 'VU','VANUATU','Vanuatu','VUT','548'
>>>> 'VE','VENEZUELA','Venezuela','VEN','862'
>>>> 'VN','VIET NAM','Viet Nam','VNM','704'
>>>> 'VG','VIRGIN ISLANDS, BRITISH','Virgin Islands, British','VGB','092'
>>>> 'VI','VIRGIN ISLANDS, U.S.','Virgin Islands, U.s.','VIR','850'
>>>> 'WF','WALLIS AND FUTUNA','Wallis and Futuna','WLF','876'
>>>> 'EH','WESTERN SAHARA','Western Sahara','ESH','732'
>>>> 'YE','YEMEN','Yemen','YEM','887'
>>>> 'ZM','ZAMBIA','Zambia','ZMB','894'
>>>> 'ZW','ZIMBABWE','Zimbabwe','ZWE','716'
>>>>
>>>>
>>>> This all looks OK to me.
>>>>
>>>> Thanks for the help in advance.
>>>>
>>>> Love and peace,
>>>> Joe
>>>>
>>>>

-- 



Reply via email to