Post by robotguy4 on Jul 9, 2024 1:57:05 GMT -5
![sillehbee Avatar](http://storage.forums.net/6001674/images/oRkqh1MvnkfpyN86SuDV.png)
Can anyone help me? 😭 I've read through as many of the replies as I can, and I still can't figure out how to resolve my issue.
I'm at the compile stage, and I get the error when trying to run compile.py that it's not finding Utilities.
PS C:\Users\Natalie\Documents\VS Code\Sims 4 Python Script Workspace> & C:/Users/Natalie/AppData/Local/Programs/Python/Python37/python.exe "c:/Users/Natalie/Documents/VS Code/Sims 4 Python Script Workspace/My Script Mods/Example Mod/compile.py"
Traceback (most recent call last):
File "c:/Users/Natalie/Documents/VS Code/Sims 4 Python Script Workspace/My Script Mods/Example Mod/compile.py", line 1, in <module>
from Utilities import compile_module
ModuleNotFoundError: No module named 'Utilities'
So I attempted to follow what other users have said, and I moved settings.py and the entire Utilities folder into the mod folder, and then running compile.py. The issue is that even though the compile works afterward, it generates the script file as "sillehbee_Sims 4 Python Script Workspace.ts4script" inside of the root folder and the script also doesn't work in game.
Since the script file didn't work in game, I tried changing the extension to .zip to see what was inside it, and it was empty?
Can anyone help me? ):
Not 100% sure what's going on, but if I had to guess, it's that something wrong happened to the Pycharm Project from moving the Utilities folder around, hence the "ModuleNotFoundError: No module named 'Utilities'" error.
Either move the Utilies folder back or go back to the Getting Started instructions on the first post starting at step 3.
When you get to (or retry) step 6, input your name but also make sure the location of your game, and the location of your mods folder are correct. On my system, I had to change
mods_folder = os.path.expanduser(
os.path.join('~', 'Documents', 'Electronic Arts', 'The Sims 4', 'Mods')
)
to
mods_folder = os.path.expanduser(
os.path.join('~', 'Onedrive', 'Documents', 'Electronic Arts', 'The Sims 4', 'Mods')
)
because of &%$#?!ing Onedrive. I had to set game_folder to:
game_folder = os.path.join('C:', os.sep, 'Program Files (x86)', 'Steam', 'steamapps', 'common', 'The Sims 4')
because I have the Steam version.
If step 8 doesn't generate any files (Note: you may need to right-click the EA folder in the project window and go to "Reload from disk" to see them in Pycharm) that means something isn't set up correctly, possibly the path in settings.py. Hopefully this either fixes the problem and/or causes a different error. :P