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&#39;t mix them. E.g<br>
<br># /etc/init.d/apache2 reload<br>-&gt; start a project on the web - ok<br>-&gt; check it out with bzr+http - fails<br>-&gt; create another project - ok<br># /etc/init.d/apache2 reload<br>-&gt; check out the previously created projects - ok<br>
-&gt; 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 &lt;module&gt;, line 146 &#39;module&#39; object has no attribute &#39;ElementTree&#39;<br>
<br>I&#39;ve checked what is elementtree when xml_serializer is called by adding two logging lines at the beginning of the file. They log the &quot;signature&quot; of elementtree and the elementtree.ElementTree variables<br>
<br>* web interface after restart:<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>ElementTree&lt;module &#39;xml.etree.ElementTree&#39; from &#39;/usr/lib/python2.5/xml/etree/ElementTree.pyc&#39;&gt;<br>
<br>* a new create writes nothing, xml_serializer is not called<br><br>* a failed checkout<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>&nbsp;(the failure occurs at the second log line in this case)<br>
<br>* a successful checkout, after the restart<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>ElementTree&lt;module &#39;xml.etree.ElementTree&#39; from &#39;/usr/lib/python2.5/xml/etree/ElementTree.pyc&#39;&gt;<br>
<br>* another checkout does nothing<br><br>* a failed create from the web<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>
elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>
elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br>elementtree&lt;module &#39;xml.etree&#39; from &#39;/usr/lib/python2.5/xml/etree/__init__.pyc&#39;&gt;<br><br>and this was just one call!<br>
<br>this is &quot;my&quot; code that raises the exception above<br>def createRepo(path, mask=0750):<br>&nbsp;&nbsp;&nbsp; &#39;&#39;&#39;<br>&nbsp;&nbsp;&nbsp; Run &quot;bzr init-repo --no-working-tree&quot; at the given location<br>&nbsp;&nbsp;&nbsp; &#39;&#39;&#39;<br>
&nbsp;&nbsp;&nbsp; repository_format = bzrdir.format_registry.make_bzrdir(&#39;pack-0.92&#39;)<br>&nbsp;&nbsp;&nbsp; os.mkdir(path, mask)<br>&nbsp;&nbsp;&nbsp; transport = LocalTransport(&#39;file://&#39; + path)<br>&nbsp;&nbsp;&nbsp; newdir = repository_format.initialize_on_transport(transport)<br>
&nbsp;&nbsp;&nbsp; try:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repo = newdir.create_repository(shared=True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repo.set_make_working_trees(False)<br>&nbsp;&nbsp;&nbsp; except:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise<br>&nbsp;&nbsp;&nbsp; else:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return repo<br><br>Any ideas how to overcome this problem?<br>
<br>Viktor<br>