On 1 avr, 16:12, sim <imasim...@gmail.com> wrote:
> Hello,
> I am new to Python/Django and working on web services.
> I have two files client and server both running on different ports

I assume you mean "two scripts" ?

> and
> working as client server. Problem is this: When I send a string say
> '121ABC' from client as parameter to server file, it catch perfectly
> but when I assign to any veriable it raise this error " Server raised
> fault: 'invalid literal for int() with base 10: '211ABC' ' ".
>
> Please help in this regard. If there is anything missing please let me
> know.

As usual : *minimal* working code reproducing the behaviour, full
traceback, and eventually test data sets.

Anyway: you say "when I assign to any veriable it raise this error",
but given the error message, it looks like you're doing something like
this:

  param = "121ABC"
  var = int(param)


Now please reread the error message and ask yourself whether "ABC" is
a meaningful textual representation of a base 10 integer ? Hint : no,
Python *won't* silently skip the non numeric characters here and try
to build the int from the remaining numeric characters.

HTH

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to