Hi,<br><br>I have a web interface to create new repositories, but I check them out with the usual command line bzr. The strange thing is that after an apache reload either the web interface or the command line checkout works, and I can redo it any time I want, but I can't mix them. E.g<br>
<br># /etc/init.d/apache2 reload<br>-> start a project on the web - ok<br>-> check it out with bzr+http - fails<br>-> create another project - ok<br># /etc/init.d/apache2 reload<br>-> check out the previously created projects - ok<br>
-> create another project - fails<br><br>The error is always the same:<br>AttributeError at /usr/lib/python2.5/site-packages/bzrlib/xml_serializer.py in <module>, line 146 'module' object has no attribute 'ElementTree'<br>
<br>I've checked what is elementtree when xml_serializer is called by adding two logging lines at the beginning of the file. They log the "signature" of elementtree and the elementtree.ElementTree variables<br>
<br>* web interface after restart:<br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>ElementTree<module 'xml.etree.ElementTree' from '/usr/lib/python2.5/xml/etree/ElementTree.pyc'><br>
<br>* a new create writes nothing, xml_serializer is not called<br><br>* a failed checkout<br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br> (the failure occurs at the second log line in this case)<br>
<br>* a successful checkout, after the restart<br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>ElementTree<module 'xml.etree.ElementTree' from '/usr/lib/python2.5/xml/etree/ElementTree.pyc'><br>
<br>* another checkout does nothing<br><br>* a failed create from the web<br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>
elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>
elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br>elementtree<module 'xml.etree' from '/usr/lib/python2.5/xml/etree/__init__.pyc'><br><br>and this was just one call!<br>
<br>this is "my" code that raises the exception above<br>def createRepo(path, mask=0750):<br> '''<br> Run "bzr init-repo --no-working-tree" at the given location<br> '''<br>
repository_format = bzrdir.format_registry.make_bzrdir('pack-0.92')<br> os.mkdir(path, mask)<br> transport = LocalTransport('file://' + path)<br> newdir = repository_format.initialize_on_transport(transport)<br>
try:<br> repo = newdir.create_repository(shared=True)<br> repo.set_make_working_trees(False)<br> except:<br> raise<br> else:<br> return repo<br><br>Any ideas how to overcome this problem?<br>
<br>Viktor<br>