On Saturday 31 July 2010, Paul Alfille elucidated thus:
> If you find a solution, I'll add it to the next release.
OK, I found the solution. What was happening was this:
1. Class had defined a custom __getattr__
2. Then in __getattr__, the class tried to access an attribute via
self._attribute_name
3. This then, of course, called __getattr__ again.
I'm not 100% sure why it's not finding _attrs in the instance variables.
You might want to run the fix against the test suite.
Why this did not blow up before Python 2.6, I don't know.
And here is the output before the fix (no sensors attached, just a USB
key):
DEFAULT: ow_ds9490.c:DS9490_detect(457) Unclear what <> means in USB
specification, will use first adapter.
DEFAULT: ow_ds9490.c:DS9490_open(1238) Opened USB DS9490 bus master at
003:002.
DEFAULT: ow_ds9490.c:DS9490_ID_this_master(600) Set DS9490 003:002
unique id to 81 4B C9 2C 00 00 00 94
DS9490 - /
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded in
__subclasscheck__' in <type 'exceptions.AttributeError'> ignored
DS1420 - /81.4BC92C000000
And after:
DEFAULT: ow_ds9490.c:DS9490_detect(457) Unclear what <> means in USB
specification, will use first adapter.
DEFAULT: ow_ds9490.c:DS9490_open(1238) Opened USB DS9490 bus master at
003:002.
DEFAULT: ow_ds9490.c:DS9490_ID_this_master(600) Set DS9490 003:002
unique id to 81 4B C9 2C 00 00 00 94
DS9490 - /
DS1420 - /81.4BC92C000000
Hope that helps! Feedback welcome!
j
--
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
[email protected] - Jabber: [email protected]
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A
--- __init__.py.orig 2010-08-03 20:55:50.000000000 -0800
+++ __init__.py 2010-08-03 21:10:59.000000000 -0800
@@ -343,14 +343,11 @@
and thr PIO.0 might be 1.
"""
#print 'Sensor.__getattr__', name
- if name in self._attrs:
- attr = owfs_get( self._attrs[ name ] )
- else:
+ try:
+ return owfs_get(object.__getattribute__(self, '_attrs')[name])
+ except KeyError:
raise AttributeError, name
- return attr
-
-
def __setattr__( self, name, value ):
"""
Set the value of a sensor attribute. This is accomplished by
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers