Skip to content

grass.temporal: Fix error messages when removing map timestamps - #7954

Merged
petrasovaa merged 1 commit into
OSGeo:mainfrom
bhuvan-somisetty:fix-temporal-remove-timestamp-messages
Sep 29, 2026
Merged

petrasovaa merged 1 commit into
OSGeo:mainfrom
bhuvan-somisetty:fix-temporal-remove-timestamp-messages

Conversation

@bhuvan-somisetty

Copy link
Copy Markdown
Contributor

Description

Fix two error messages in remove_timestamp_from_grass() in
python/grass/temporal/space_time_datasets.py:

  • VectorDataset: the message used a %s placeholder with str.format(),
    so the map name was never inserted. The placeholder is now {}.
  • Raster3DDataset: the message said "raster map"; it now says
    "3D raster map" like the other messages in that class.

Motivation and context

Fixes #7953

Before:

ERROR: Unable to remove timestamp for vector map <%s>
ERROR: Unable to remove timestamp for raster map <elev3d>

After:

ERROR: Unable to remove timestamp for vector map <roads>
ERROR: Unable to remove timestamp for 3D raster map <elev3d>

How has this been tested?

  • Checked the new message strings format as expected in plain Python.
  • pre-commit run --files python/grass/temporal/space_time_datasets.py
    passes (ruff check, ruff format, flake8, etc.).

The error path is only reached when the C library fails to remove the
timestamp file, so no test was added for these message-only changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to not work as before)

Checklist

  • PR title provides summary of the changes and starts with one of the
    pre-defined prefixes
  • My code follows the code style
    of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@github-actions github-actions Bot added Python Related code is in Python libraries labels Sep 26, 2026
@bhuvan-somisetty

Copy link
Copy Markdown
Contributor Author

The failing OSGeo4W / windows-2022 build and tests check is unrelated to this change. All 99 errors are ImportError: Could not load grass_gis.8.6, and the same job fails identically on main (e.g. run 36199017231: 1307 passed, 99 errors). It has also been failing on other PRs since 2026-09-25.

@ninsbl ninsbl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. In fact, I may be the one who caused this...
From what I understand, the % formating is the way to go for translatable strings / messages...

@bhuvan-somisetty
bhuvan-somisetty force-pushed the fix-temporal-remove-timestamp-messages branch from 37f1bf6 to 6f979c2 Compare September 29, 2026 07:55
The vector map message used a %s placeholder with str.format(), so the
map name was never inserted and a literal <%s> was shown. The 3D raster
map message referred to the map as a raster map, unlike the other
messages in Raster3DDataset.

Fixes OSGeo#7953.

Signed-off-by: bhuvan-somisetty <somisettybhuvan5@gmail.com>
@bhuvan-somisetty
bhuvan-somisetty force-pushed the fix-temporal-remove-timestamp-messages branch from 6f979c2 to c81a9bc Compare September 29, 2026 08:38
@petrasovaa
petrasovaa merged commit 5c89798 into OSGeo:main Sep 29, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] grass.temporal: Wrong error messages in remove_timestamp_from_grass() for vector and 3D raster maps

4 participants