Unfortunately python's csv capabilities have a fundamental problem - they
can't express null/None content. Any empty content will always show up as
an empty string ''. So what's being pass to your date constructor is an
empty string which is not a valid date format. Best work around is to
generally iterate over your results and replace any '' value with None.

-- Ben


On Thu, Aug 28, 2014 at 2:44 AM, Joel Goldstick <joel.goldst...@gmail.com>
wrote:

> I'm using an application to import some csv files to my models.  This
> package bombs with the error
> Exception Value: [u"'' value has an invalid date format. It must be in
> YYYY-MM-DD format."]
>
> when the csv has empty data.
>
> I've googled, and it looks like there is some discussion on the github
> page making me think this should work for me, but it doesn't
>
> Any ideas?
> --
> Joel Goldstick
> http://joelgoldstick.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPM-O%2BxFqva%2BDUFuT8vPArETWo561iJeuzLeLZARL-yxoP%2BwZA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Chief Systems Architect Proteus Technologies <http://proteus-tech.com>
Chief Fan Biggest Fan Productions <http://biggestfan.net>
Personal blog where I am not your demographic
<http://notyourdemographic.com>.

This email intended solely for those who have received it. If you have
received this email by accident - well lucky you!!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHN%3D9D7pgGu2_dwNB_o6n-qNWXTeDTb%2Bv%3DKopy642Cn%2B0Fm6nQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to