- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Why is my custom career throwing this error?
- Site Map >
- Modding and Creation >
- Sims 4 Creation >
- Modding Discussion >
- Why is my custom career throwing this error?
Replies: 1 (Who?), Viewed: 3523 times.
#1
23rd Dec 2017 at 3:38 AM
Posts: 98
Thanks: 679 in 32 Posts
Why is my custom career throwing this error?
I extracted all the Astronaut files, and I've been working my way through to convert them to my own career. At this point, I'm pretty happy with everything I've learned, except... It's throwing an error.
Sims can't join a career.
Here's the error:
Code:
<?xml version="1.0" ?><root> <report><version>2</version><sessionid>9d97ed0919f2ef775a3dc91d</sessionid><type>desync</type><sku>ea.maxis.sims4_64.15.pc</sku><createtime>2017-12-23 03:11:19</createtime><buildsignature>Local.Unknown.Unknown.1.37.35.1010-1.300.000.106.Release</buildsignature><categoryid>career_tuning.py:745</categoryid><desyncid>9d97ed0919f2ef775a3dc91d</desyncid><systemconfig/><screenshot/><desyncdata>[manus] Exception in <class 'sims4.tuning.instances.career_Adult_Prostitute'>._tuning_loaded_callback. (AttributeError: 'NoneType' object has no attribute 'career_levels') Traceback (most recent call last): File "T:\InGame\Gameplay\Scripts\Core\sims4\utils.py", line 195, in wrapper File "T:\InGame\Gameplay\Scripts\Server\areaserver.py", line 148, in c_api_server_init_tick File "T:\InGame\Gameplay\Scripts\Core\sims4\core_services.py", line 164, in start_service_tick File "T:\InGame\Gameplay\Scripts\Core\sims4\service_manager.py", line 335, in start_single_service File "T:\InGame\Gameplay\Scripts\Core\sims4\tuning\instance_manager.py", line 104, in update_incremental_start File "T:\InGame\Gameplay\Scripts\Core\sims4\tuning\instance_manager.py", line 149, in _execute_gen File "T:\InGame\Gameplay\Scripts\Core\sims4\tuning\instance_manager.py", line 475, in invoke_registered_callbacks_gen File "T:\InGame\Gameplay\Scripts\Server\careers\career_tuning.py", line 707, in _tuning_loaded_callback File "T:\InGame\Gameplay\Scripts\Server\careers\career_tuning.py", line 745, in _propagate_track_and_level_data AttributeError: 'NoneType' object has no attribute 'career_levels' </desyncdata></report> <report><version>2</version><sessionid>9d97ed0919f2ef775a3dc91d</sessionid><type>desync</type><sku>ea.maxis.sims4_64.15.pc</sku><createtime>2017-12-23 03:11:54</createtime><buildsignature>Local.Unknown.Unknown.1.37.35.1010-1.300.000.106.Release</buildsignature><categoryid>career_base.py:757</categoryid><desyncid>9d97ed0919f2ef775a3dc91d</desyncid><systemconfig/><screenshot/><desyncdata>Exception in Sim Timeline: Exception running Element (AttributeError: 'NoneType' object has no attribute 'career_levels') Traceback (most recent call last): File "T:\InGame\Gameplay\Scripts\Server\scheduling.py", line 212, in simulate File "T:\InGame\Gameplay\Scripts\Server\elements.py", line 335, in _run File "T:\InGame\Gameplay\Scripts\Server\interactions\utils\interaction_elements.py", line 162, in _behavior_element File "T:\InGame\Gameplay\Scripts\Server\careers\career_tuning.py", line 1441, in _do_behavior File "T:\InGame\Gameplay\Scripts\Server\careers\career_tuning.py", line 813, in get_join_career_pb File "T:\InGame\Gameplay\Scripts\Server\careers\career_base.py", line 757, in get_career_entry_level AttributeError: 'NoneType' object has no attribute 'career_levels' </desyncdata></report> </root>
I enclose my package file. Thanks so much
Attached files:
sinfulsimming_prostitution---frd.7z (756.0 KB, 40 downloads) - View custom content | ||||||||||
Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2017-12-22 22:16:40 ....A 778716 773964 sinfulsimming_prostitution---frd.package ------------------- ----- ------------ ------------ ------------------------ 778716 773964 1 files, 0 folders |
"Whatcha doin'?"
"Probing your mind."
"Kinda roomy, innit?"
Advertisement
#2
23rd Dec 2017 at 7:16 PM
Posts: 2,671
Thanks: 62690 in 190 Posts
The career_Adult_Prostitute loaded and asked to get a callback once everything that it depended on had been loaded. When the game informed it that everything was loaded it went and looked for tuning that contained a career_levels attribute, but that object itself hadn't properly loaded so instead of finding a career_track numbered 11609978360981259333 (or whichever one, likely all of them failed to load) it instead found nothing - so when it tried to access the career_levels tuning from that career_track it threw an exception and gave up.
What failed to load that caused the career_track to not load is uncertain without further examination - you can go about arduously checking every bit of XML and just go crazy, or you can start by confirming what DID load.
I pasted this bit of code...
into the D3OI "probe" area and it generated a text file containing all objects known by the game. That list is over 117,000 objects, so I used some UNIX commands (via Cygwin for Windows) to search for only objects that contain the word "prostititue" and came up with a list of 95 objects, and the career_track items were listed in that. Hmm, it looks like everything loaded, so why is not finding the career track properly? I have a hunch...
Turning back to D3OI, I revamped the code to look at the Prostitute_Track1 object itself, like so:
This outputs everything from inside the Prostitute_Track1 class in the loaded Python:
Of particular interest in that output was the line for the 'guid64' which was 18129306063481722005. However, in your XML that's listed as 15218931442441434790. Checking the filename (and the Instance number in the filename is what is used when you import into s4pe as the instance number - that s="15218931442441434790" entry in the XML is essentially a comment) the instance number should be 0xFB983BCFC229D495 and converting that to decimal yields the 18129306063481722005.
So it looks like at least once (the start_track of career_Adult_Prostitute) you are referencing the wrong instance number - 15218931442441434790 instead of 18129306063481722005, or you are using the wrong hex instance number in your filename. You need to make the hex value in the filename match the decimal instance number you're using inside your XML by changing one or the other and making sure all the XML points to the proper value used in the filename.
You'll probably want to follow up by checking all of your instance values to make sure they match the hex in the filename by using a good decimal -> hex converter (some use the 64th bit as a positive/negative indicator, so they won't output the right values!)
Finally, when I did my Class Clown aspiration mod (which is no longer working I'm sure) I had to use 32 bit instance numbers for the Aspiration (type 0x28b64675), Objective (0x0069453e) and AspirationTrack (0xc020fcad) tunings. Not sure if EAxis has fixed that by now or not, so YMMV.
What failed to load that caused the career_track to not load is uncertain without further examination - you can go about arduously checking every bit of XML and just go crazy, or you can start by confirming what DID load.
I pasted this bit of code...
Code:
################################## # INSERT CUSTOM PROBE CODE BELOW # ################################## try: for cls in get_all_subclasses(object): output += '{}\n'.format(cls) except: output += "EXCEPTION: {}\n".format(traceback.format_exc())
into the D3OI "probe" area and it generated a text file containing all objects known by the game. That list is over 117,000 objects, so I used some UNIX commands (via Cygwin for Windows) to search for only objects that contain the word "prostititue" and came up with a list of 95 objects, and the career_track items were listed in that. Hmm, it looks like everything loaded, so why is not finding the career track properly? I have a hunch...
Turning back to D3OI, I revamped the code to look at the Prostitute_Track1 object itself, like so:
Code:
try: for cls in get_all_subclasses(object): if "Prostitute_Track1" in cls.__name__: output += '{}\n'.format(cls) for k,v in inspect.getmembers(cls): output += ' {}={}\n'.format(k,v) except: output += "EXCEPTION: {}\n".format(traceback.format_exc())
This outputs everything from inside the Prostitute_Track1 class in the loaded Python:
Code:
<class 'sims4.tuning.instances.Prostitute_Track1'> INSTANCE_TUNABLES={'icon_high_res': <TunableResourceKey>, 'career_levels': <sims4.tuning.tunable.TunableList object at 0x000007FFD6C9F410>, 'image': <TunableResourceKey>, 'goodbye_notification': <snippets.define_snippet.<locals>.SnippetVariant object at 0x000007FFD7BDABD0>, 'active_assignment_amount': <TunableFloat>, 'career_name_gender_neutral': <TunableLocalizedStringFactory>, 'career_description': <TunableLocalizedString>, 'busy_time_situation_picker_tooltip': <TunableLocalizedString>, 'knowledge_notification': <snippets.define_snippet.<locals>.SnippetVariant object at 0x000007FFD7BDAB18>, 'career_name': <TunableLocalizedStringFactory>, 'assignment_chance': <TunablePercent>, 'overmax': <sims4.tuning.tunable.OptionalTunable object at 0x000007FFD6C6DA28>, 'outfit_generation_type': <TunableEnumEntry>, 'icon': <TunableResourceKey>, 'branches': <sims4.tuning.tunable.TunableList object at 0x000007FFD6C9F4B0>, 'assignments': <sims4.tuning.tunable.TunableList object at 0x000007FFD6C9F7D0>} __class__=<attribute '__class__' of 'object' objects> __delattr__=<slot wrapper '__delattr__' of 'object' objects> __dict__=<attribute '__dict__' of 'Prostitute_Track1' objects> __dir__=<method '__dir__' of 'object' objects> __doc__=None __eq__=<slot wrapper '__eq__' of 'object' objects> __format__=<method '__format__' of 'object' objects> __ge__=<slot wrapper '__ge__' of 'object' objects> __getattribute__=<slot wrapper '__getattribute__' of 'object' objects> __gt__=<slot wrapper '__gt__' of 'object' objects> __hash__=<slot wrapper '__hash__' of 'object' objects> __init__=<slot wrapper '__init__' of 'object' objects> __le__=<slot wrapper '__le__' of 'object' objects> __lt__=<slot wrapper '__lt__' of 'object' objects> __module__=sims4.tuning.instances __ne__=<slot wrapper '__ne__' of 'object' objects> __new__=<built-in method __new__ of type object at 0x000000001E279280> __reduce__=<method '__reduce__' of 'object' objects> __reduce_ex__=<method '__reduce_ex__' of 'object' objects> __repr__=<slot wrapper '__repr__' of 'object' objects> __setattr__=<slot wrapper '__setattr__' of 'object' objects> __sizeof__=<method '__sizeof__' of 'object' objects> __str__=<slot wrapper '__str__' of 'object' objects> __subclasshook__=<method '__subclasshook__' of 'object' objects> __weakref__=<attribute '__weakref__' of 'TunableCareerTrack' objects> _verify_tuning_callback=<classmethod object at 0x000007FFD6C9E710> active_assignment_amount=0.0 assignment_chance=0.5 assignments=() branches=() busy_time_situation_picker_tooltip=hash: 2010240382 career_description=hash: 1494477556 career_levels=() career_name=<sims4.localization.TunableLocalizedStringFactory._Wrapper object at 0x000007FFBC4A6248> career_name_gender_neutral=<sims4.localization.TunableLocalizedStringFactory._Wrapper object at 0x000007FFBC4A64E8> goodbye_notification=<class 'sims4.tuning.instances.notification_GoToWorkGoodbye_Generic'> guid=2972237525 guid64=18129306063481722005 icon='00000000!27b92ba2'96146f42.2f7d0004' icon_high_res='00000000!75a413e6'6b959476.2f7d0004' image='00000000!66650772'84098fa2.2f7d0004' knowledge_notification=<class 'sims4.tuning.instances.notification_AskAboutCareer_Generic'> outfit_generation_type=CareerOutfitGenerationType.CAREER_TUNING overmax=None parent_track=None reloadable=True resource_key='00000000!fb983bcf'c229d495.48c75ce3' tuning_manager=InstanceManager_career_track
Of particular interest in that output was the line for the 'guid64' which was 18129306063481722005. However, in your XML that's listed as 15218931442441434790. Checking the filename (and the Instance number in the filename is what is used when you import into s4pe as the instance number - that s="15218931442441434790" entry in the XML is essentially a comment) the instance number should be 0xFB983BCFC229D495 and converting that to decimal yields the 18129306063481722005.
So it looks like at least once (the start_track of career_Adult_Prostitute) you are referencing the wrong instance number - 15218931442441434790 instead of 18129306063481722005, or you are using the wrong hex instance number in your filename. You need to make the hex value in the filename match the decimal instance number you're using inside your XML by changing one or the other and making sure all the XML points to the proper value used in the filename.
You'll probably want to follow up by checking all of your instance values to make sure they match the hex in the filename by using a good decimal -> hex converter (some use the 64th bit as a positive/negative indicator, so they won't output the right values!)
Finally, when I did my Class Clown aspiration mod (which is no longer working I'm sure) I had to use 32 bit instance numbers for the Aspiration (type 0x28b64675), Objective (0x0069453e) and AspirationTrack (0xc020fcad) tunings. Not sure if EAxis has fixed that by now or not, so YMMV.
Who Posted
|