Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in temporal algebra #12

Open
petrasovaa opened this issue Sep 9, 2024 · 1 comment
Open

error in temporal algebra #12

petrasovaa opened this issue Sep 9, 2024 · 1 comment

Comments

@petrasovaa
Copy link
Contributor

In the example in the third time series tutorial (algebra) I am getting this error:

# Get time series with month of maximum LST
expression="month_max_lst = if({during}, lst_daily == tmap(lst_maximum), start_month(), null())"

gs.run_command("t.rast.algebra",
               basename="month_max_lst",
               expression=expression,
               suffix="gran",
               nprocs=4)
Traceback (most recent call last):
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/scripts/t.rast.algebra", line 146, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/scripts/t.rast.algebra", line 136, in main
    pc = p.parse(expression, basename, gs.overwrite())
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/temporal_raster_algebra.py", line 126, in parse
    self.parser.parse(expression)
  File "/usr/lib/python3/dist-packages/ply/yacc.py", line 333, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ply/yacc.py", line 1201, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ply/yacc.py", line 192, in call_errorfunc
    r = errorfunc(token)
        ^^^^^^^^^^^^^^^^
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/temporal_algebra.py", line 3416, in p_error
    raise SyntaxError(
SyntaxError: syntax error on line 1, position 42 token TMAP near 'tmap' expression 'month_max_lst = if({during}, lst_daily == tmap(lst_maximum), start_month(), null())'
@petrasovaa
Copy link
Contributor Author

Could you perhaps run through this whole tutorial, I am getting errors from other examples as well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant