[GRASS-dev] [GRASS GIS] #3641: python3/ctypes: ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected LP_struct_Cell_head instance instead of LP_struct_Cell_head

Moritz Lennert mlennert at club.worldonline.be
Thu Sep 13 05:49:22 PDT 2018


Hi Anna,

Any idea where this comes from ? It currently keeps me from using trunk.

Moritz

On 11/09/18 14:59, GRASS GIS wrote:
> #3641: python3/ctypes: ctypes.ArgumentError: argument 2: <type
> 'exceptions.TypeError'>: expected LP_struct_Cell_head instance instead of
> LP_struct_Cell_head
> ----------------------------+-------------------------
>   Reporter:  mlennert        |      Owner:  grass-dev@…
>       Type:  defect          |     Status:  new
>   Priority:  normal          |  Milestone:  7.8.0
> Component:  Python          |    Version:  unspecified
>   Keywords:  Python3 ctypes  |        CPU:  Unspecified
>   Platform:  Unspecified     |
> ----------------------------+-------------------------
>   In a script using i.cutlines which in turn uses GridModule I suddenly get
>   the following error using trunk:
> 
>   {{{
>   Traceback (most recent call last):
>     File "/home/mlennert/.grass7/addons/scripts/i.cutlines", line 673, in
>   <module>
>       main()
>     File "/home/mlennert/.grass7/addons/scripts/i.cutlines", line 278, in
>   main
>       grd.run()
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
>   gnu/etc/python/grass/pygrass/modules/grid/grid.py", line 568, in run
>       self.patch()
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
>   gnu/etc/python/grass/pygrass/modules/grid/grid.py", line 609, in patch
>       self.start_row, self.start_col, self.out_prefix)
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
>   gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 91, in
>   rpatch_map
>       rpatch_row(rast, rrasts, rbbox)
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
>   gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 41, in
>   rpatch_row
>       sei = get_start_end_index(bboxes)
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
>   gnu/etc/python/grass/pygrass/modules/grid/patch.py", line 25, in
>   get_start_end_index
>       r_start, c_start = coor2pixel((bbox.west, bbox.north), reg)
>     File "/data/home/mlennert/SRC/GRASS/grass_trunk/dist.x86_64-pc-linux-
>   gnu/etc/python/grass/pygrass/utils.py", line 180, in coor2pixel
>       return (libraster.Rast_northing_to_row(north, region.byref()),
>   ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected
>   LP_struct_Cell_head instance instead of LP_struct_Cell_head
>   }}}
> 
>   I do not have this error with 7.6.
> 
> 
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
> 




More information about the grass-dev mailing list