Opened 8 years ago

Closed 8 years ago

#3214 closed defect (fixed)

t.rast.mapcalc: TypeError: object of type 'NoneType' has no len()

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Temporal Version: svn-releasebranch72
Keywords: t.rast.mapcalc Cc:
CPU: Unspecified Platform: Unspecified

Description

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()

Attachments (1)

patch_3214.diff (550 bytes ) - added by martinl 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by martinl, 8 years ago

Version: unspecifiedsvn-releasebranch72

by martinl, 8 years ago

Attachment: patch_3214.diff added

comment:2 by martinl, 8 years ago

Attachment:patch_3214.diff seems to fix this issue.

Version 0, edited 8 years ago by martinl (next)

comment:3 by martinl, 8 years ago

In 70001:

t.rast.mapcalc: TypeError: object of type 'NoneType' has no len() (see #3214)

comment:4 by martinl, 8 years ago

Resolution: fixed
Status: newclosed

In 70002:

t.rast.mapcalc: TypeError: object of type 'NoneType' has no len() (fixes #3214)

Note: See TracTickets for help on using tickets.