[New-bugs-announce] [issue25619] Exception AttributeError: "'NoneType'.... thrown on exit

terry report at bugs.python.org
Fri Nov 13 14:08:03 EST 2015


New submission from terry:

The attached code generates this output:

init called
finished init
init called
finished init
init called
finished init
initPorts done
alldone
destroying /sys/class/gpio/gpio16/
destroying /sys/class/gpio/gpio6/
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound method sysfsGpio.__del__ of <__main__.sysfsGpio instance at 0xb6c90e68>> ignored
destroying /sys/class/gpio/gpio13/
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound method sysfsGpio.__del__ of <__main__.sysfsGpio instance at 0xb6c90e40>> ignored

It is necessary to have two functions defined (railVarRes() and batleveltopct()) and further more changing the name of railVarRes to arailVarRes changes the behavior:


init called
finished init
init called
finished init
init called
finished init
initPorts done
alldone
destroying /sys/class/gpio/gpio16/
destroying /sys/class/gpio/gpio13/
destroying /sys/class/gpio/gpio6/
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound method sysfsGpio.__del__ of <__main__.sysfsGpio instance at 0xb6c10e68>> ignored


notice that the order of the class destruction has changed.

----------
files: bug.py
messages: 254612
nosy: Terry Garyet
priority: normal
severity: normal
status: open
title: Exception AttributeError: "'NoneType'....  thrown on exit
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file41032/bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25619>
_______________________________________


More information about the New-bugs-announce mailing list