[GRASS-dev] [GRASS GIS] #3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()

#3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()
----------------------------+-------------------------
Reporter: martinl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: Temporal | Version: unspecified
Keywords: t.rast.mapcalc | CPU: Unspecified
Platform: Unspecified |
----------------------------+-------------------------
I have two spatial-temporal datasets: `tp2` and `tp5`. `t.rast.mapcalc`
works when using one dataset:

{{{
t.rast.mapcalc in=tp5 exp="tp5 < 40" out=water basename=water --o
}}}

But combination of two datasets fails:

{{{
t.rast.mapcalc in=tp2,tp5 exp="tp5 < 40 || tp2 < 40" out=water
basename=water --o
}}}

with

{{{
ERROR: The temporal map type of the sample dataset must be interval
     main()
   File "/opt/src/grass72_release/dist.x86_64-pc-linux-
gnu/scripts/t.rast.mapcalc", line 95, in main
     base, method, nprocs, register_null, spatial)
   File "/opt/src/grass72_release/dist.x86_64-pc-linux-
gnu/etc/python/grass/temporal/mapcalc.py", line 122, in
dataset_mapcalculator
     if not list and len(list) == 0:
TypeError: object of type 'NoneType' has no len()
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3214&gt;
GRASS GIS <https://grass.osgeo.org>

#3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()
--------------------------+---------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Temporal | Version: svn-releasebranch72
Resolution: | Keywords: t.rast.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by martinl):

* version: unspecified => svn-releasebranch72

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3214#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()
--------------------------+---------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Temporal | Version: svn-releasebranch72
Resolution: | Keywords: t.rast.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by martinl):

* Attachment "patch_3214.diff" added.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3214&gt;
GRASS GIS <https://grass.osgeo.org>

#3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()
--------------------------+---------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Temporal | Version: svn-releasebranch72
Resolution: | Keywords: t.rast.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by martinl):

Attachment:patch_3214.diff seems to fix this issue.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3214#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()
--------------------------+---------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Temporal | Version: svn-releasebranch72
Resolution: | Keywords: t.rast.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by martinl):

In [changeset:"70001" 70001]:
{{{
#!CommitTicketReference repository="" revision="70001"
t.rast.mapcalc: TypeError: object of type 'NoneType' has no len() (see
#3214)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3214#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3214: t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()
--------------------------+---------------------------------
  Reporter: martinl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Temporal | Version: svn-releasebranch72
Resolution: fixed | Keywords: t.rast.mapcalc
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Changes (by martinl):

* status: new => closed
* resolution: => fixed

Comment:

In [changeset:"70002" 70002]:
{{{
#!CommitTicketReference repository="" revision="70002"
t.rast.mapcalc: TypeError: object of type 'NoneType' has no len() (fixes
#3214)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3214#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>