<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 6, 2018 at 8:59 AM, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to run the i.zc module in parallel on several tiles. I use this syntax<br>
<br>
    if options['tile_width']:<br>
        parallel = True<br>
        width = int(options['tile_width'])<br>
        height = int(options['tile_height'])<br>
        overlap = int(options['overlap'])<br>
<br>
    processes = int(options['processes'])<br>
<br>
<br>
<br>
kwargs = {'input' : inputraster,<br>
          'output' : temp_edge_map,<br>
          'width' : int(options['zc_width']),<br>
          'threshold' : float(options['zc_threshold'])<wbr>,<br>
          'quiet' : True}<br>
<br>
if parallel:<br>
   grd = GridModule('i.zc',<br>
                    width=width,<br>
                    height=height,<br>
                    overlap=overlap,<br>
                    processes=processes,<br>
                    split=False,<br>
                    **kwargs)<br>
<br>
<br>
However, this fails (understandably) with<br>
<br>
TypeError: type object got multiple values for keyword argument 'width'<br>
<br>
Is there a way to work around this name conflict ? Do I have to define my own class derived from GridModule to change the parameter names ?<br>
</blockquote></div><br></div><div class="gmail_extra">Try `width_` instead of `width` for the module parameter. This is how grass.script works (mostly to avoid conflicts with Python keywords namely lambda), but without checking the code, I don't know if PyGRASS has this implemented.<br><br></div><div class="gmail_extra">Vaclav<br></div></div>