Friday, May 3, 2013

Re: Form Validation Error: 'No' value must be either True or False.

Solved.

To anyone who may come across this very obscure issue for themselves, it's entirely an error specific to my setup.

I had rsync'd the code onto the live server from /home/django/rfc/ into /home/django/rfc/rfc. As it's inside the pythonpath, the code is still valid and will be executed, especially when you have various stuff in the same dir names as your app etc.

I grep'd through the django code and found that only BooleanField gave my specific error and I only didn't have BooleanField anymore. So I did a grep of my code on live and found my old models.py file buried underneath everything, which did have the fields as BooleanField.

Wow. 2 whole days to find that.


On 3 May 2013 13:49, Darren Mansell <darren.mansell@gmail.com> wrote:



On 3 May 2013 13:06, Tom Evans <tevans.uk@googlemail.com> wrote:
On Fri, May 3, 2013 at 12:38 PM, Darren Mansell
<darren.mansell@gmail.com> wrote:
>
> Another bit of info, just in case anyone is currently looking at this..
>
> The error is coming from
> /usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py
>
> …
>
> So it's failing validation because it's seeing the field as a
> BooleanField, when I quite obviously have set it as a CharField.
>
> I'm absolutely stuck.

In your second mail, you say that the only failing case is "live
server with Apache 2.2.22-1ubuntu1.3 / mod-wsgi 3.3-4build1". Are you
sure you have fully updated and restarted this server to pick up your
changes?

Cheers

Tom

Hey Tom, thanks for the reply.

Yeah the live server is Ubuntu 12.04 and the dev server is actually my laptop running Ubuntu 13.10 which accounts for the version differences.

I'm rsyncing files from one to the other and have checked the code gets copied which it does.

I'm now thinking that because I've got another copy of this project running on the server, but with older code, it's failing with that.

I'll clone the VM and run it fully separate. 

Thanks.

--
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+unsubscribe@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment