<div dir="ltr">I can't reproduce it with the example from manual.<div><br></div><div>It's obviously a ctypes problem, that's one of the issues I haven't been able to solve, although I thought this comes up only with Python 3, not 2. That's why I wanted to branch 7.6 first because I knew it might take some time to get these problem fixed in trunk.<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018 at 8:49 AM Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Anna,<br>
<br>
Any idea where this comes from ? It currently keeps me from using trunk.<br>
<br>
Moritz<br>
<br>
On 11/09/18 14:59, GRASS GIS wrote:<br>
> #3641: python3/ctypes: ctypes.ArgumentError: argument 2: <type<br>
> 'exceptions.TypeError'>: expected LP_struct_Cell_head instance instead of<br>
> LP_struct_Cell_head<br>
> ----------------------------+-------------------------<br>
>   Reporter:  mlennert        |      Owner:  grass-dev@…<br>
>       Type:  defect          |     Status:  new<br>
>   Priority:  normal          |  Milestone:  7.8.0<br>
> Component:  Python          |    Version:  unspecified<br>
>   Keywords:  Python3 ctypes  |        CPU:  Unspecified<br>
>   Platform:  Unspecified     |<br>
> ----------------------------+-------------------------<br>
>   In a script using i.cutlines which in turn uses GridModule I suddenly get<br>
>   the following error using trunk:<br>
> <br>
>   {{{<br>
>   Traceback (most recent call last):<br>
>     File "/home/mlennert/.grass7/addons/scripts/i.cutlines", line 673, in<br>
>   <module><br>
>       main()<br>
>     File "/home/mlennert/.grass7/addons/scripts/i.cutlines", line 278, in<br>
>   main<br>
>       grd.run()<br>
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-<br>
>   gnu/etc/python/grass/pygrass/modules/grid/grid.py", line 568, in run<br>
>       self.patch()<br>
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-<br>
>   gnu/etc/python/grass/pygrass/modules/grid/grid.py", line 609, in patch<br>
>       self.start_row, self.start_col, self.out_prefix)<br>
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-<br>
>   gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 91, in<br>
>   rpatch_map<br>
>       rpatch_row(rast, rrasts, rbbox)<br>
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-<br>
>   gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 41, in<br>
>   rpatch_row<br>
>       sei = get_start_end_index(bboxes)<br>
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-<br>
>   gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 25, in<br>
>   get_start_end_index<br>
>       r_start, c_start = coor2pixel((bbox.west, bbox.north), reg)<br>
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-<br>
>   gnu/etc/python/grass/pygrass/utils.py", line 180, in coor2pixel<br>
>       return (libraster.Rast_northing_to_row(north, region.byref()),<br>
>   ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected<br>
>   LP_struct_Cell_head instance instead of LP_struct_Cell_head<br>
>   }}}<br>
> <br>
>   I do not have this error with 7.6.<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> grass-dev mailing list<br>
> <a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
> <br>
<br>
<br>
</blockquote></div></div></div>