[redland-dev] [Redland Language Bindings 0000531]: Python exceptions when exiting application

Mantis Bug Tracker mantis-bug-sender at librdf.org
Mon Feb 11 17:24:07 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=531 
====================================================================== 
Reported By:                dbrnz
Assigned To:                
====================================================================== 
Project:                    Redland Language Bindings
Issue ID:                   531
Category:                   api
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Binding Language (java, perl, php, python, ruby, tcl): python 
====================================================================== 
Date Submitted:             2013-02-11 22:23
Last Modified:              2013-02-11 22:23
====================================================================== 
Summary:                    Python exceptions when exiting application
Description: 
Python reports exceptions from RDF.py in the form "Exception TypeError:
"'NoneType' object is not callable" in <bound method Node.__del__ of <RDF.Node
object at 0x101d80990>> ignored" when exiting.

This only happens as part of a large package and doesn't show with simple
examples. With some investigation, a reason is my use of module level variables
(e.g. XSD = RDF.NS('http://www.w3.org/2001/XMLSchema#') ) that are then used for
other module level variables (e.g. FLOAT_DATATYPE = XSD.float), coupled with a
few levels of importing -- all is well with a simple import of the module.

I've found http://www.python.org/doc/essays/cleanup/ (not sure when it was
written though), so the real reason looks like Python's module cleanup code
getting confused. Meanwhile the attached patch to RDF.py will prevent the
messages.

Thanks.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-02-11 22:23 dbrnz          New Issue                                    
2013-02-11 22:23 dbrnz          File Added: RDF.diff                         
======================================================================



More information about the redland-dev mailing list