[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
GRASS GIS
trac at osgeo.org
Tue Sep 11 05:59:44 PDT 2018
#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.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3641>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list