AttributeError

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Mon Mar 20 19:33:01 EST 2000


Andy Worthington wrote in comp.lang.python:
> I am getting the following error:
> 
> Traceback (innermost last):
>   File "/u/web/rockc1/cgi-local/rockcityeurope1.py", line 46, in ?
>     reason1=string.replace(reason1,"a","b")
> AttributeError: replace
> 
> The replace seems to work like this on another machine from the command line
> but this doesn't work on the webserver I am trying to run it from.  Is this
> because of an older version of python?  If so, is there another way that I
> can replace all occurences of a character with another in a string (replace
> \n with a space).

Do you perhaps have a variable named string nearby? Could you post some more
code that reproduces the error?


-- 
Remco Gerlich,  scarblac at pino.selwerd.nl

   This is no way to be
     Man ought to be free      -- Ted Bundy
       That man should be me



More information about the Python-list mailing list