Hi John,
Welcome to the group, and thanks for the report !
I didn't think of this case, but it certainly makes sense. I tried
this simple script :
=============
import random
from buzhug import Base
persons = Base('persons')
persons.create(('name',str),('parent',persons),mode="override")
for i in range(10):
persons.insert(name='pierre') # parent is set to None
for i in range(100):
persons.insert(name='simon',parent=persons[random.randint(0,10)])
persons.close()
p2 = Base('persons').open()
===============
It raised an exception, but not the one you mention, it was a "maximum
recursion depth"
I tried this patch, which worked for the test above : in line 442 of
buzhug.py, replace the block by :
if v.startswith('<base>'):
# reference to an external base
base_path = urllib.unquote(v[6:])
if base_path ==
self.name:
ext_db = self
else:
ext_db = Base(base_path).open()
self._register_base(ext_db)
self.fields[k] = ext_db
else:
self.fields[k] = self.types[v]
Does this solve the problem in your script ? If so I will include the
patch in a future version
Best regards,
Pierre