[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colons
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with gui/wxpython/core/watchdog.py, where the reported traceback points to CurrentMapsetWatch.on_modified() parsing the GISRC file. Inspect the line.split(":") handling and check nearby tests or watcher behavior for GISRC values containing multiple colons. Done when the watcher handles such a value without raising ValueError; the issue does not name a specific test.
Written by the indexing model from the issue text.
Description
Describe the bug
The following message in the console shows up when running GRASS. It might affect display of new layers in the data panel (I often have to use the refresh button to show them).
grass gis Exception in thread Thread-4: Traceback (most recent call last): File "/usr/lib/python3.14/threading.py", line 1082, in _bootstrap_inner self._context.run(self.run) ~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/usr/lib/python3/dist- packages/watchdog/observers/api.py", line 213, in run self.dispatch_events(self.event_queue) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist- packages/watchdog/observers/api.py", line 391, in dispatch_events handler.dispatch(event) ~~~~~~~~~~~~~~~~^^^^^^^ File "/usr/lib/python3/dist-packages/watchdog/events.py", line 217, in dispatch getattr(self, f"on_{event.event_type}")(event) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/usr/local/grassmaster/grass86/gui/wxpython/core/wat chdog.py", line 73, in on_modified key, val = line.split(":") ^^^^^^^^ ValueError: too many values to unpack (expected 2, got 3)
To reproduce
Nothing particularly, just run GRASS
Expected behavior
The exception message should not appear, and if related, layers should automatically show in the Data panel when created.
Screenshots
System description
Ubuntu 26.04
version=8.6.0dev
date=2026
revision=01eff84f83
build_date=2026-10-19
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=01eff84f83
libgis_date=2026-10-19T17:03:23+00:00
proj=9.7.1
gdal=3.12.2
geos=3.14.1
sqlite=3.46.1
Additional context
According to ChatGTP, this is a bug in the GRASS GIS wxGUI file watcher (gui/wxpython/core/watchdog.py). The CurrentMapsetWatch.on_modified() method monitors the GRASS session configuration file (GISRC) to detect changes in the active mapset. It reads that file using key, val = line.split(":"). This assumes that each line contains exactly one colon, separating a configuration key from its value. The exception terminates the affected watchdog observer thread. As a consequence, automatic detection of mapset changes may stop working, particularly changes initiated outside the GUI. Replacing key, val = line.split(":") with key, val = line.split(":", 1) should fix it.
For me, it does indeed fix it. I am not confident enough this is the right fix, so I am not creating a PR but putting it here as lead.
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 447
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 107
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OSGeo/grass
-
[Bug] grass.pygrass: Cats.delete(0) deletes all layer categories instead of category 0Possibly taken @Mohit-Ak claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
[Bug] macOS: Startup crashes with StopIteration when ~/Documents is not readable (macOS privacy protection)Possibly taken @NIne-WIngEd claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OSGeo/grass#8027 · 3 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 65/100
OSGeo/grass#7860 · 1 comment ·
Maintainers usually reply within 1 day
-
bug GUI macOS
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OSGeo/grass#6012 · 3 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
v9.6.0: CMake incorrectly enforces presence of libevdevPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug Component component: net
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RT-Thread/rt-thread#11913 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
contiki-ng/contiki-ng#3289 ·
Maintainers usually reply within 3 days
-
area:docs help wanted type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
semantic-reasoning/wirelog#2229 ·
Maintainers usually reply within 1 day