Your message dated Fri, 21 Aug 2015 14:49:52 +0200
with message-id <20150821124949.gg29...@chough.tokkee.org>
and subject line Re: Python ownet library cannot access sensor's attribute
has caused the Debian Bug report #792927,
regarding Python ownet library cannot access sensor's attribute
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
792927: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792927
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-ownet
Version: 2.8p15-1
Severity: grave

The ownet python module does not work properly. This script should open a
connection to the owserver on localhost, display the information for sensor
10.67C6697351FF and then print the value of its temperature attribute:

#!/bin/python
import ownet
r = ownet.Sensor('/10.67C6697351FF', 'localhost', 4304)
print r
print r.temperature

The connection works and the sensor information is shown, but the attribute
cannot be read because a library method is not found:

walter@walter-VirtualBox:~$ python test.py
localhost:4304/10.67C6697351FF - DS18S20
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    print r.temperature
  File "/usr/lib/python2.7/dist-packages/ownet/__init__.py", line 252, in
__getattr__
    attr = object._connection.read(object.__getattribute__(self,
'_attrs')[name])
AttributeError: type object 'object' has no attribute '_connection'

This error can be fixed easily by editing line 252 in file
"/usr/lib/python2.7/dist-packages/ownet/__init__.py":

-- attr = object._connection.read(object.__getattribute__(self,
'_attrs')[name])
++ attr = self._connection.read(self.__getattribute__('_attrs')[name])

I have reproduced and fixed this bug on 2 machines:
* Raspbian on a Raspberry PI B with python 2.7.3-4+deb7u1
Linux smarthome 4.0.8+ #804 PREEMPT Tue Jul 14 12:57:44 BST 2015 armv6l
GNU/Linux
* Ubuntu 14.4 LTS with python 2.7.5-5ubuntu3
Linux walter-VirtualBox 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19
09:27:48 UTC 2015 i686 i686 i686 GNU/Linux

--- End Message ---
--- Begin Message ---
Source: owfs
Version: 2.9p8-6

Hi,

On Mon, Jul 20, 2015 at 10:51:42AM +0200, Walter Weissensteiner wrote:
> The ownet python module does not work properly. This script should open a
> connection to the owserver on localhost, display the information for sensor
> 10.67C6697351FF and then print the value of its temperature attribute:
> 
> #!/bin/python
> import ownet
> r = ownet.Sensor('/10.67C6697351FF', 'localhost', 4304)
> print r
> print r.temperature
> 
> The connection works and the sensor information is shown, but the attribute
> cannot be read because a library method is not found:
> 
> walter@walter-VirtualBox:~$ python test.py
> localhost:4304/10.67C6697351FF - DS18S20
> Traceback (most recent call last):
>   File "test.py", line 5, in <module>
>     print r.temperature
>   File "/usr/lib/python2.7/dist-packages/ownet/__init__.py", line 252, in
> __getattr__
>     attr = object._connection.read(object.__getattribute__(self,
> '_attrs')[name])
> AttributeError: type object 'object' has no attribute '_connection'

This only affects oldstable. Version 2.9p8-6 (stable, testing, unstable)
is not affected anymore. I'm not sure this warrants an update to
oldstable.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x2F1FFCC7 +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to