Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73423 > unrolled thread

pyhon 1.5.2 problem

Started by"Pat Fourie" <peft@icon.co.za>
First post2014-06-19 14:55 +0200
Last post2014-06-19 13:59 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  pyhon 1.5.2 problem "Pat Fourie" <peft@icon.co.za> - 2014-06-19 14:55 +0200
    Re: pyhon 1.5.2 problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-19 13:59 +0000

#73423 — pyhon 1.5.2 problem

From"Pat Fourie" <peft@icon.co.za>
Date2014-06-19 14:55 +0200
Subjectpyhon 1.5.2 problem
Message-ID<mailman.11148.1403184001.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Good Day all,

I have the following problem.

This is the python code

#

Import SER

#

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

..

..

..

When I run the above code I get the following error :

 

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

AttributeError : set_speed

 

Can anyone help as this did work before.I have recompiled everything but the
problem still

Exists.

In anticipation,

Many Thanks

Pat

peft@icon.co.za

 


-- 
This message has been scanned for viruses and
dangerous content by Pinpoint, and is
believed to be clean.

[toc] | [next] | [standalone]


#73431

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-06-19 13:59 +0000
Message-ID<53a2ecbf$0$29988$c3e8da3$5496439d@news.astraweb.com>
In reply to#73423
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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web