Re: mdig model

15 views
Skip to first unread message

Joel Pitt

unread,
Aug 19, 2010, 8:01:08 PM8/19/10
to Senay, Senait, mdig...@googlegroups.com
Hi Senait,

Thanks for pointing out that bug...

If you completely delete the commented out site tags then it should
work. Some of the code doesn't check if things are comments, which was
my mistake when first starting to use the xml library...

I'll have this fixed in the updated installer that I'll send you soon.
I've fixed the issues we were having, I just need to repackage it all.

Joel Pitt, PhD | http://ferrouswheel.me | +64 21 101 7308
NetEmpathy Co-founder | http://netempathy.com
OpenCog Developer | http://opencog.org


On Fri, Aug 20, 2010 at 11:53 AM, Senay, Senait
<Senait...@lincolnuni.ac.nz> wrote:
> Hi Joel,
>
> hope all is going well,  i am trying a few things with MDiG, i have a quick
> help request,
>
> when i want to add a model on MDiG it adds it fine, and when i try to run it
> it gives me this error,
> i copied it here.
>
> I am just trying with a very simple one, almost a copy of the one you gave
> us (lhumile) but only with diffrent parameter's on the number of replicates
> etc...
>
> from what i can gather.. the problem seems to be on the way the sites were
> entered because the error sites 'x' i am assuming it is to say coo-ordinate
> X.
>
> i have copied both the error that came up on MDiG CMD and the model.
>
> error
>
> c:\mdig\mdig\mdig>python mdig.py add
> C:\Users\senays\Documents\DATA_2010\lhumile
> .xml
> 20100820 11:39:49 [mdig.repos] INFO: Using GRASS DB location
> c:\mdig\mdig\test2
> 20100820 11:39:49 [mdig.repos] INFO: Creating mapset for model lhumile
> 20100820 11:39:49 [mdig.repos] INFO: Created mapset for model lhumile
> Successfully added model to mapset c:\mdig\mdig\test2\NZTM\lhumile
> c:\mdig\mdig\mdig>python mdig.py run lhumile
> 20100820 11:39:55 [mdig.repos] INFO: Using GRASS DB location
> c:\mdig\mdig\test2
> Traceback (most recent call last):
>   File "mdig.py", line 244, in <module>
>     main(sys.argv[1:])
>   File "mdig.py", line 165, in main
>     exp = model.DispersalModel(model_xml_file, the_action)
>   File "c:\mdig\mdig\mdig\mdig\model.py", line 130, in __init__
>     self.check_model()
>   File "c:\mdig\mdig\mdig\mdig\model.py", line 535, in check_model
>     res = self.get_resources()
>   File "c:\mdig\mdig\mdig\mdig\model.py", line 369, in get_resources
>     maps = self.get_map_resources()
>   File "c:\mdig\mdig\mdig\mdig\model.py", line 421, in get_map_resources
>     ls = self.get_lifestage(ls_id)
>   File "c:\mdig\mdig\mdig\mdig\model.py", line 963, in get_lifestage
>     self.lifestages[ls_id]=Lifestage(nodes[0])
>   File "c:\mdig\mdig\mdig\mdig\lifestage.py", line 57, in __init__
>     self._loadLifestage()
>   File "c:\mdig\mdig\mdig\mdig\lifestage.py", line 90, in _loadLifestage
>     self.initial_maps[r_id]=GrassMap(m_node)
>   File "c:\mdig\mdig\mdig\mdig\grassmap.py", line 54, in __init__
>     self._read_XML()
>   File "c:\mdig\mdig\mdig\mdig\grassmap.py", line 78, in _read_XML
>     x=int(s.attrib["x"])
> KeyError: 'x'
> c:\mdig\mdig\mdig>python mdig.py remove lhumile
> 20100820 11:40:23 [mdig.repos] INFO: Using GRASS DB location
> c:\mdig\mdig\test2
> Are you sure you wish to remove model lhumile and it's associate mapset?
> [y/n] y
> Model removed
> c:\mdig\mdig\mdig>
>
> thanks a lot,
> Senait
>

Reply all
Reply to author
Forward
0 new messages