Hi

UK Post Code validation is failing for me with a TypeError when trying
to checkout.  It appears that the post code is being passed to
parse_uk_postcode in satchmo.l10n.validators.ukpostcode as a type
rather than as a string.

I'm using latest SVN checkout of both Satchmo and Django.  Trace
below...

Traceback:
File "/Library/Python/2.5/site-packages/django/core/handlers/base.py"
in get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/Library/Python/2.5/site-packages/satchmo/payment/decorators.py"
in _checkorder
  28.                 return view_func(request, *args, **kwargs)
File "/Library/Python/2.5/site-packages/satchmo/payment/views.py" in
_contact_info
  143.     return common_contact.contact_info(request, **kwargs)
File "/Library/Python/2.5/site-packages/satchmo/payment/common/views/
common_contact.py" in contact_info
  52.         if form.is_valid():
File "/Library/Python/2.5/site-packages/django/forms/forms.py" in
is_valid
  120.         return self.is_bound and not bool(self.errors)
File "/Library/Python/2.5/site-packages/django/forms/forms.py" in
_get_errors
  111.             self.full_clean()
File "/Library/Python/2.5/site-packages/django/forms/forms.py" in
full_clean
  234.                     value = getattr(self, 'clean_%s' % name)()
File "/Library/Python/2.5/site-packages/satchmo/contact/forms.py" in
clean_postal_code
  91.         return
self.validate_postcode_by_country(self.cleaned_data['postal_code'])
File "/Library/Python/2.5/site-packages/satchmo/contact/forms.py" in
validate_postcode_by_country
  322.         responses = signals.validate_postcode.send(self,
postcode=postcode, country=country)
File "/Library/Python/2.5/site-packages/django/dispatch/dispatcher.py"
in send
  148.             response = receiver(signal=self, sender=sender,
**named)
File "/Library/Python/2.5/site-packages/satchmo/contact/listeners.py"
in uk_postcode_validator
  12.             pc = ukpostcode.parse_uk_postcode(str)
File "/Library/Python/2.5/site-packages/satchmo/l10n/validators/
ukpostcode.py" in parse_uk_postcode
  53.   postcode = postcode.replace(' ', '').upper() # Normalize

Exception Type: TypeError at /checkout/
Exception Value: replace() takes at least 2 arguments (1 given)

Any guidance appreciated.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to