[redland-dev] Re: Python Bindings Error
Simon Cross
simon at sanbi.ac.za
Mon Jun 20 15:34:52 BST 2005
Ping,
Last year in October, Sébastien Pierre wrote [1]:
> I am using Redland (0.9.18.1) in a Python application, and am getting
> the following exception in the case I describe later:
>
> Exception exceptions.TypeError: "'NoneType' object is not callable" in
> <bound method World.__del__ of <RDF.World object at 0x74e0b0>> ignored
I've just triggered the same problem and managed to isolate the problem
to a small test case.
The exception, which occurs when exiting Python, is triggered when you
have a package, foo, and a module, bar, inside foo which imports *both*
RDF and the package foo. I've attached a small tar file of the
package. Running "import foo.bar" and then exiting the Python
interpreter triggers the bug.
I'm not 100% sure if this kind of importing is proper Python but it's
not circular (since the package doesn't import the module in it's
__init__.py) and it's often useful (when __init__.py does stuff the
module needs).
I've worked around the problem by removing the package import line from
the module and importing the other bits of the package needed by the
module directly.
[1] http://lists.usefulinc.com/pipermail/redland-dev/2004-October/000680.html
Schiavo
Simon
More information about the redland-dev
mailing list