Forum Discussion
So, if I am correct here, this error is related to following LastException:
Last Module Called: resolver.py Last Function Called: __call__ Error message: Exception raised while trying to run a test event in test_events.py: (TypeError: unhashable type: 'set'), CategoryID: resolver:129
I did some digging and this is a really interesting error.
Essentially, the issue is that the game caches the tests it runs so that if the same exact "event" were to happen again (same Sim, same interaction, etc. -- the cache system is rather specific) the game doesn't have to re-calculate whether or not the thing can happen. This is all well and good. However, it is stored in a Python dictionary, which needs "immutable" objects as part of its keys. This itself is not an issue, but it is where the problem lies.
As part of the caching system, the tag set on the interaction run that would count towards the money earned gets cached, as it's part of the information that gets resolved (many aspirations for example use the tags on interactions as a way of testing if a Sim's done something, so this itself makes sense to be tracked) and all resolved data gets put together as part of the "key" in the cache. However, the tag set on the interaction is a set, not a frozenset, and so it's not hashable. Because of that, an error occurs when the game attempts to cache the result of the test.
File 'T:\InGame\Gameplay\Scripts\Server\event_testing\resolver.py', line 129, in __call__ [ self : DataResolver: participant: , test : <event_testing.tests_with_data.SimoleonsEarnedTest object at 0x00007FF499E380B8>, expected_args : {'sims': 'sim_instance', 'amount': 'from_event_data', 'skill_used': 'from_event_data', 'tags': 'from_event_data'}, resolved_args : { 'sims': (<sim '' 0xe760dd25fed001b>,), 'amount': 198, 'skill_used': None, 'tags': {2368, 2435, 446, <Tag.Fire_Flammable_AutoAdded = 1925>, 1929, <Tag.BuyCatLD_WallDecoration = 201>, <Tag.Interaction_Super = 460>, <Tag.Interaction_All = 462>, 12433, 2069, 2133, <Tag.Interaction_SellArt = 661>, 2459, 2140, 2076, 482, 483, 484, 2667, 1261, 75000, 573, 894} }, event_key : tags, participant_type : from_event_data, value : ({2368, 2435, 446, <Tag.Fire_Flammable_AutoAdded = 1925>, 1929, <Tag.BuyCatLD_WallDecoration = 201>, <Tag.Interaction_Super = 460>, <Tag.Interaction_All = 462>, 12433, 2069, 2133, <Tag.Interaction_SellArt = 661>, 2459, 2140, 2076, 482, 483, 484, 2667, 1261, 75000, 573, 894},) ]
The above snippet is from an MCLE stack trace that expresses this error.
"But how do you know this is from the Hustle goal of the Self Care aspiration?" you might ask. From the line above in the stack trace, it tells me:
File 'T:\InGame\Gameplay\Scripts\Server\event_testing\resolver.py', line 935, in __call__ [ self : DataResolver: participant: , test : <event_testing.tests_with_data.SimoleonsEarnedTest object at 0x00007FF499E380B8>, data_object : <event_testing.event_data_object.EventDataObject object at 0x00007FF49A1FC110>, objective_guid64 : 271492, __class__ : <class 'event_testing.resolver.DataResolver'>]
The objective with instance ID 271492 is objectives_Asp_Wellness_SelfCareSpecialist_1 and it called "Hustle" in the English UI.
<T n="display_text">0x86E475E3<!--String: "Hustle"--></T>
Unfortunately, there's not really an easy way to fix this in Python (to be truly honest, I'd strongly recommend against trying to monkey-patch this since it's a complicated system and tinkering with this could cause a lot of unexpected errors "upstream") and from the tuning side of things, the problem can't be directly solved (it can be reworked into a system that doesn't use the exact type of test and thus bypasses the part of the code that causes errors -- I believe this is what simvasion does).
I tried to sell a stack of shells worth 5,500 S while tending chair, table and giving yoga classes both at home and in the spa and it still didn't register ...
About The Sims 4 Bug Reports - Archive
Community Highlights
Recent Discussions
- 2 days ago