Closed toconnell closed 6 years ago
...and here's your error:
[2018-03-14 07:58:15] INFO: settlements object 'Bloodwalk' [5aa91c674af5ca167f38aafd] event: Adding 'Slenderman' expansion content!
[2018-03-14 07:58:15] INFO: settlements object 'Bloodwalk' [5aa91c674af5ca167f38aafd] event: slenderman@test.it added 'It's Already Here' to Lantern Year 6
[2018-03-14 07:58:15] INFO: settlements object 'Bloodwalk' [5aa91c674af5ca167f38aafd] event: slenderman@test.it added 'Nemesis Encounter' to Lantern Year 9
[2018-03-14 07:58:15] WARNING: Key errors encountered when comparing events {'type': 'story_event', 'name': 'Armored Strangers', 'ly': 6} and {'handle': 'core_armored_strangers'}
[2018-03-14 07:58:15] ERROR: Event could not be removed from settlements object 'Bloodwalk' [5aa91c674af5ca167f38aafd] timeline! {'type': 'story_event', 'name': 'Armored Strangers', 'ly': 6}
[2018-03-14 07:58:15] WARNING: Key errors encountered when comparing events {'type': 'nemesis_encounter', 'name': "Nemesis Encounter: King's Man", 'ly': 9} and {'name': "Nemesis Encounter: King's Man Lvl 1"}
[2018-03-14 07:58:15] WARNING: Key errors encountered when comparing events {'type': 'nemesis_encounter', 'name': "Nemesis Encounter: King's Man", 'ly': 9} and {'type': 'nemesis_encounter', 'name': 'Nemesis Encounter', 'ly': 9}
[2018-03-14 07:58:15] ERROR: Event could not be removed from settlements object 'Bloodwalk' [5aa91c674af5ca167f38aafd] timeline! {'type': 'nemesis_encounter', 'name': "Nemesis Encounter: King's Man", 'ly': 9}
[2018-03-14 07:58:15] INFO: Added 'Slenderman' expansion to settlements object 'Bloodwalk' [5aa91c674af5ca167f38aafd]
The error is in the Settlement's _rm_timelineevent() method and it's failing on this part of the expansion's definition:
"timeline_rm": [
{"ly": 6, "type": "story_event", "name": "Armored Strangers"},
{"ly": 9, "type": "nemesis_encounter", "name": "Nemesis Encounter: King's Man"},
],
The basic problem looks like the events we're trying to remove aren't the same as the ones in the 1.2 version of the PotLantern timeline.
(Honestly this method is a mess: I should probably just re-do the whole thing, at this point.)
...and the type/sub_type bug rears its ugly head once again. Turns out that the _add_timelineevent() method is also screwing up, because it's adding events by their type
(which is always just 'event') rather than their sub_type
, which it should be doing.
Dang.
@WayForger You really stumbled upon a doozy here: this one basically needs a tear-down/rebuild for the whole mechanism that the API uses to do automatic Timeline updates.
(I'm joking: this is a major issue that I missed in the Timeline upgrade and...honestly, the stuff I'm going to have to address here should have been handled a long time ago, e.g. when I migrated Timeline controls over from the old webapp.)
Alright, this is all wrapped up. I'm going to let it burn in and...passively test it out in the background as I work through the rest of the stuff for this release.
From email:
My surmise here is that there's something in the old methods for adding and removing TL events that doesn't jibe with one of the changes that we made in the Timeline upgrade (probably the event dicts in the expansion asset definition are no longer "correct", that sort of thing).
sub_type
, rather thantype
(which does us no effing good)timeline_add
andtimeline_rm
)