Page MenuHomePhabricator

python evaluation error: function call: "'dict' object has no attribute 'split'"
Closed, ResolvedPublicBUG REPORT

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Avoid expanding identity keys in composition language v2.repos/abstract-wiki/wikifunctions/function-orchestrator!603apineapine-identity-keysmain
Customize query in GitLab

Event Timeline

Referenced in Wikifunctions:Community portal#Tasks listed by users

What is wrong with my implementation at Z32055? Looking at the failed test, it returns an error because 'dict' has no attribute 'split', but I didn't use split anywhere in my code. What is the issue? ChaoticVermillion (talk) 01:38, 14 March 2026 (UTC)[reply]

I think that error message is coming from the type converter. I think Z20424K1['Z20420K2']['Z20342K1'] would be a dictionary representing a Gregorian calendar month (Z16098) but the code is written as though it were a string? Neither Python nor type converters are in my wheelhouse. YoshiRulz (talk) 03:49, 14 March 2026 (UTC)[reply]

Another good test case (thank you, @gengh :

{
  "Z1K1": "Z7",
  "Z7K1": "Z20780",
  "Z20780K1": {
    "Z1K1": "Z20420",
    "Z20420K1": {
      "Z1K1": "Z20159",
      "Z20159K1": {
        "Z1K1": "Z17813",
        "Z17813K1": {
          "Z1K1": "Z17813",
          "Z17813K1": "Z17814"
        }
      },
      "Z20159K2": {
        "Z1K1": "Z13518",
        "Z13518K1": "2026"
      }
    },
    "Z20420K2": {
      "Z1K1": "Z20342",
      "Z20342K1": {
        "Z1K1": "Z16098",
        "Z16098K1": {
          "Z1K1": "Z16098",
          "Z16098K1": "Z16103"
        }
      },
      "Z20342K2": {
        "Z1K1": "Z13518",
        "Z13518K1": "18"
      }
    }
  },
  "Z20780K2": "Z1002"
}

Okay, I've modified the Python renderer; this should work now.

@99of9 , does this seem to be working now?

This was part of a larger phenomenon (identity keys being resolved when they arguably shouldn't), which the team is tracking separately.

Yes, this particular test now works. (although as I understand it, we're now using v1 again anyway)

I promise we also had it working before the v1 switch! Gonna close for now, but we can reopen if it's still messed up.

Change #1259205 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-03-18-023444 to 2026-03-23-124102

https://gerrit.wikimedia.org/r/1259205

Change #1259205 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2026-03-18-023444 to 2026-03-23-124102

https://gerrit.wikimedia.org/r/1259205