Metadata change with python processor

52 views
Skip to first unread message

ZajtiM

unread,
Jan 22, 2026, 2:54:55 PM (21 hours ago) Jan 22
to golden-cheetah-users
Hi Ale,

You will most likely know this. Is there a reason why the metadata (Workout_Code etc.) cannot be modified with the Python processor? Or was it simply not implemented?

Unless i'm doing it the wrong way. I don't get any errors.

Simple code example:
"

GC.activityMetrics()["Workout_Code"] = "ERG"

GC.activityMetrics()["Sport"] = "Bike"
"

Cheers,
Mitja


Poncho

unread,
Jan 22, 2026, 3:02:40 PM (21 hours ago) Jan 22
to golden-che...@googlegroups.com

ZajtiM

unread,
Jan 22, 2026, 3:24:31 PM (21 hours ago) Jan 22
to golden-cheetah-users
Hi Poncho,

Thank you for quick reply and help. I thought since it is a "tag", i will be adding / editing tags, that are "new" feature.
I got a little confused. Now i see that "tags" are in Train view, for workout files.

Tested it and is working just the way i want / need it.

Cheers,
Mitja

ZajtiM

unread,
Jan 22, 2026, 4:53:16 PM (19 hours ago) Jan 22
to golden-cheetah-users
Am i still doing something wrong or is this how it works?

I want to change 3 metadata fields with "setTag" within one processor. But it changes only value from first "setTag" line in processor. Raw data for example can be changed in a loop. 
I tried to loop metadata names list. But it is the same. Only first item from metadata list changes value.

I assume one workaround would be to create separate processors and "connect" them with "GC.postProcess(processor)". But that's a lot of processors.

Cheers,
Mitja

Paul J

unread,
Jan 22, 2026, 4:57:46 PM (19 hours ago) Jan 22
to golden-cheetah-users
I have an import processor that tidies my metadata, this is an example, no sure whether this helps

if (GC.getTag("Device") == "Zwift"):
GC.setTag("Sport", "Bike")
GC.setTag("SubSport", "Bike-Zwift")

ZajtiM

unread,
Jan 22, 2026, 5:20:21 PM (19 hours ago) Jan 22
to golden-cheetah-users
Hi Paul,

Good info.

But this is a bit odd. I tested it with import processor. It changes all 3 fields i want. But if i run the same processor manually from menu, it changes only first "setTag". Can anyone confirm this? If can be replicated i assume this is a bug.

Here is my code:
"

if (GC.getTag("Device") == "Dynastream Device (1000)"):

GC.setTag("Workout_Code", "ERG")

GC.setTag("Sport", "ERG")

GC.setTag("SubSport", "ERG")
"

I set all values to ERG (for testing), just to see the change.

Paul J

unread,
3:30 AM (9 hours ago) 3:30 AM
to golden-cheetah-users
Hi Mitja,

    I just tested my import processor running manually on an empty planned activity and it changed 3 fields correctly, so I'm not seeing your issue.

Paul.

ZajtiM

unread,
9:07 AM (3 hours ago) 9:07 AM
to golden-cheetah-users
I just tried it again. It seems the main reason was old configuration files.
I removed my .goldencheetah folder and started GC 3.8. With new Athlete and new .goldencheetah folder, all 3 metadata fields can changed by clicking on processor on Edit menu.

Mitja
Reply all
Reply to author
Forward
0 new messages