Hey guys, as you know I'm trying to call clamrefactor.py from NetworkEditor but I've run into a problem. When I call the constructor of the class in the module from C I get:<br>"No module named expat; use SimpleXMLTreeBuilder
instead"
<br><br>When I try to use the module directly with a Python script the constructor works just fine, so I don't think it's an installation issue as google suggests<br><br>I'll send you the code so you can reproduce the error. I'm running Ubuntu 10.04. <br>

To compile the code just type 'make' and to run it " PYTHONPATH=`pwd` ./main " otherwise the program won't find the module.<br><br>Thanks!<br><br><div class="gmail_quote">On Thu, Jul 1, 2010 at 6:01 PM, David García Garzón <span dir="ltr"><<a href="mailto:david.garcia@barcelonamedia.org">david.garcia@barcelonamedia.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>
<br>
On Thursday 01 July 2010 00:17:56 Xavier Serra wrote:<br>
</div><div><div></div><div class="h5">> On Jun 30, 2010, at 11:18 PM, Natanael Olaiz wrote:<br>
><br>
> Hi,<br>
><br>
> El 06/30/2010 09:13 PM, Xavier Serra escribió:<br>
><br>
> On Jun 30, 2010, at 5:01 PM, David García Garzón wrote:<br>
><br>
><br>
> On Monday 21 June 2010 17:14:57 Xavier Serra wrote:<br>
><br>
><br>
> Hi guys,<br>
> I'm Xavi Serra, an student at UPF doing his final project for CLAM with<br>
> David.<br>
><br>
> We intend to extend the funcionality of the NetworkEditor. The first<br>
> thing we are doing is to detect when a network file is outdated and<br>
> automatically throw clamRefactor (asking permission to the user to do<br>
> so).<br>
><br>
> [snip]<br>
><br>
> Xavier Serra<br>
><br>
><br>
> Committed after some refactorings we did yesterday together. Now a dialog<br>
> is shown on version mismatch and in the case of a network of an older<br>
> version it gives you the option to upgrade the network by using<br>
> clamrefactor before loading it. The upgrade is still dummy, but Xavi is<br>
> already working on it.<br>
><br>
> Xavi, some screenshots would be helpful so that other developers can do<br>
> comments on usability aspects. Could you put them on the wiki?<br>
><br>
><br>
><br>
> Done.<br>
><br>
> It would be great too if you guys could give some feedback about usability<br>
> issues. I think the messages are now, after David's modification, more<br>
> clear but I'd prefer more opinions.<br>
><br>
><br>
><br>
> The messages are clear to me.<br>
><br>
> But I have some questions:<br>
><br>
> 1- The clamVersion attribute did always existed on the clam network files?<br>
> (I cannot found it in the CHANGES log) If not, there are probably no clam<br>
> networks so much outdated being used... but what would happens if it<br>
> doesn't exist? From<br>
> <a href="http://doc.trolltech.com/4.5/qxmlquery.html#evaluateTo-4" target="_blank">http://doc.trolltech.com/4.5/qxmlquery.html#evaluateTo-4</a> : "If output is<br>
> null behavior is undefined."<br>
><br>
><br>
> It didn't. Files without the attribute are treated as older file and thus,<br>
> need conversion. David told me these files are pre-1.2 or so.<br>
<br>
<br>
</div></div><div class="im">Indeed first versioned version was 1.3.1 (unreleased) so unversioned versions<br>
should be considered 1.3.0 or earlier.<br>
<br>
</div><div class="im">> 2- What would be the behavior in case of different versions? I think that<br>
> checking the version number is OK as a first test of possible conflict<br>
> between releases, but the needed changes and the definitely tests should<br>
> be done looking in a migrationScript file or something like that. How we<br>
> would deal with the different migrationScripts that we have in the core<br>
> and different plugins? We would include all of them in the NetworkEditor<br>
> to make such a test?<br>
><br>
><br>
> When NetworkEditor detects that a file is older it will throw clamRefactor.<br>
> The idea is to have a migrationScript file with the steps needed to go<br>
> from version to version and use that when calling clamRefactor<br>
<br>
> 3- David: do you think that it would be difficult to put the interface to<br>
> check the network version on the CLAM::XMLStorage class? I know that this<br>
> improvement  and interface to  solve the version conflict is inherent to<br>
> the NetworkEditor, but CLAM::XMLStorage would not be the ideal place to<br>
> just check the version? Maybe returning diferent error codes on the<br>
> Restore...<br>
<br>
</div><div><div></div><div class="h5">First approach was using XMLStorage to extract just the version in a double<br>
parsing like now, but that led us to some hard to solve problems. It's true<br>
that doing such a thing in the actual network loading would be more elegant it<br>
would need more insight from Xavi on the loading process. So i would left that<br>
for a future refactoring. Sorry for adding a new dependency but still is Qt.<br>
<br>
Besides that, current cases are:<br>
- Same, load as is<br>
- Older, warn, update and load (default)<br>
- Older, warn, load as is<br>
- Older, warn, cancel<br>
- Newer, warn, user cancels (default)<br>
- Newer, warn, user load it as is<br>
<br>
I am wondering whether, it is more usable that, in the case of older versions<br>
updating without asking. Something like:<br>
- Same, load as is<br>
- Older, update and load<br>
- Newer, warn, user cancels (default)<br>
- Newer, warn, user load it as is<br>
<br>
Any way, while the update is not finished, i would keep update as an option.<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>