pyhon 1.5.2 problem

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Jun 19 09:59:27 EDT 2014


Are you really using Python 1.5.2? Wow. That's really old :-)

Please copy and paste the *full* traceback that Python shows.

A few more comments below:

On Thu, 19 Jun 2014 14:55:36 +0200, Pat Fourie wrote:

> This is the python code
> 
> #
> Import SER

No it isn't. "Import SER" is a syntax error. Python is case-sensitive, 
you mean "import SER" in lowercase. But the problem is, if you re-type 
the code in your message, instead of copying and pasting it, who knows 
what other new errors you introduce? We could waste hours trying to debug 
code containing errors that don't exist in the original.

Always COPY AND PASTE the EXACT code, do not re-type it from memory.

> #
> SER.set_speed('115200','8N1')

> When I run the above code I get the following error :
>  
> SER.set_speed('115200','8N1')
> AttributeError : set_speed

Do you have two files called SER, perhaps in different directories? One 
contains set_speed function, the other does not?

You should rename one of the files. Also watch out for left-over SER.pyc 
files, you should delete them.




-- 
Steven D'Aprano



More information about the Python-list mailing list