Opened 5 years ago

Closed 4 years ago

#2599 closed defect (fixed)

PyGRASS Raster execution error

Reported by: aandre Owned by: grass-dev@…
Priority: normal Milestone: 7.0.2
Component: Python Version: svn-releasebranch70
Keywords: raster Cc:
CPU: All Platform: All

Description

Hello,

creating my first ticket, i hope it's relevant and the way to do it.

I get 2 errors while executing Python scripts.

source:/branches/releasebranch_7_0/lib/python/pygrass/raster/__init__.py#L415

source:/branches/releasebranch_7_0/lib/python/pygrass/raster/__init__.py#L416

I attached a diff file.

Regards,

Adrien

Attachments (3)

pygrass_rast_init.diff (620 bytes) - added by aandre 5 years ago.
r.test.py (523 bytes) - added by aandre 5 years ago.
Test Python script generating the error
test.err (404 bytes) - added by aandre 5 years ago.
Error text

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by aandre

Attachment: pygrass_rast_init.diff added

comment:1 in reply to:  description Changed 5 years ago by wenzeslaus

Replying to aandre:

creating my first ticket, i hope it's relevant and the way to do it.

This is definitively the way. Tickets with patch attached are greatly appreciated. There is few things you can improve.

I get 2 errors while executing Python scripts.

It would be good if you can post what are the steps to reproduce the error you got. In your case probably your Python code but not the whole thing, just minimal piece of code which produces the error (e.g. taken from interactive command line). Use data from GRASS GIS NC sample dataset to help others easily reproduce the problem you have. In ideal case, your code can be used to create a test case which would now expose the error and later serve as a failsafe that the error won't happen again.

Changed 5 years ago by aandre

Attachment: r.test.py added

Test Python script generating the error

Changed 5 years ago by aandre

Attachment: test.err added

Error text

comment:2 Changed 5 years ago by aandre

Thank you for your guidance,

i attached a Python script that generates the error and the error log.

The script is launched with python /path/to/r.test.py elevation=elev.

elev can be any raster map.

comment:3 Changed 4 years ago by martinl

Milestone: 6.4.6

comment:4 in reply to:  2 ; Changed 4 years ago by lucadelu

Milestone: 6.4.67.0.1

Replying to aandre:

Thank you for your guidance,

i attached a Python script that generates the error and the error log.

The script is launched with python /path/to/r.test.py elevation=elev.

elev can be any raster map.

I commit (r65714) your patch in GRASS 7.1 (trunk), please try it.

After some tests should be backported.

comment:5 Changed 4 years ago by neteler

Milestone: 7.0.17.0.2

Ticket retargeted after 7.0.1 milestone closed

comment:6 in reply to:  4 Changed 4 years ago by aandre

Replying to lucadelu:

Replying to aandre:

Thank you for your guidance,

i attached a Python script that generates the error and the error log.

The script is launched with python /path/to/r.test.py elevation=elev.

elev can be any raster map.

I commit (r65714) your patch in GRASS 7.1 (trunk), please try it.

After some tests should be backported.

I tried and no error is reported, it seems to work now!

Thank you

comment:7 Changed 4 years ago by lucadelu

Resolution: fixed
Status: newclosed

Closing the ticket, It was already backported with r65723

Note: See TracTickets for help on using tickets.