Unity of Command II

Unity of Command II

View Stats:
monke_pooper Apr 27, 2024 @ 4:53pm
cx_Freeze:Python error in main script
Whenever I launch the game this pops up and the game doesn't launch. I just got the game and I've tried everything to fix it. I tried all the fixes for the "cx_Freeze:Python error in main script" on the other discusions but they don't work. I deleted the settings.yml file but it still doesn't work.

Thanks for any Help
< >
Showing 1-7 of 7 comments
monke_pooper Apr 27, 2024 @ 7:37pm 
this is the log
INF 2024-04-27 22:35:42,495 tools.steamworks:71 SteamworksPy loaded for Windows
INF 2024-04-27 22:35:42,496 tools.steamworks:81 Steam is running
INF 2024-04-27 22:35:42,558 tools.steamworks:86 Steamworks initialized!
INF 2024-04-27 22:35:42,732 tools.steam_api:348 Steam user stats and achievements successfully fetched
INF 2024-04-27 22:35:42,733 uoc2.paths:284 STEAM ownership PASS for package base
INF 2024-04-27 22:35:42,737 uoc2.paths:403 Installed packages:
INF 2024-04-27 22:35:42,737 uoc2.paths:405 C:\Program Files (x86)\Steam\steamapps\common\Unity of Command 2\_packages\base
INF 2024-04-27 22:35:42,746 uoc2.main:109 ARGS log: None
INF 2024-04-27 22:35:42,803 uoc2.main:115 Platform: Windows-10-10.0.22631
INF 2024-04-27 22:35:42,806 uoc2.main:136 OpenGL error checking DISABLED
INF 2024-04-27 22:35:42,854 uoc2.settings:217 Initializing settings
INF 2024-04-27 22:35:42,996 uoc2.init:72 SDL version: 2.0.12
INF 2024-04-27 22:35:42,996 uoc2.init:75 SDL_TTF version: 2.0.15
INF 2024-04-27 22:35:42,996 uoc2.init:78 SDL_Mixer version: 2.0.4
INF 2024-04-27 22:35:42,996 uoc2.init:81 SDL_Image version: 2.0.5
INF 2024-04-27 22:35:42,997 uoc2.init:92 Video driver 0: windows [Current]
INF 2024-04-27 22:35:42,997 uoc2.init:92 Video driver 1: dummy
INF 2024-04-27 22:35:43,934 uoc2.init:108 Audio driver: wasapi
INF 2024-04-27 22:35:43,934 uoc2.init:113 16 audio channels alocated
INF 2024-04-27 22:35:44,086 uoc2.init:136 Display 0: 1920x1080 (0, 0, 1920, 1080) [Current]
INF 2024-04-27 22:35:44,106 OpenGL.acceleratesupport:19 OpenGL_accelerate module loaded
INF 2024-04-27 22:35:44,116 OpenGL.arrays.arraydatatype:285 Using accelerated ArrayDatatype
INF 2024-04-27 22:35:44,243 uoc2.init:192 OpenGL version: 3.3.0 NVIDIA 537.70
INF 2024-04-27 22:35:44,243 uoc2.init:195 Shading language version: 3.30 NVIDIA via Cg compiler
INF 2024-04-27 22:35:44,243 uoc2.init:198 GL renderer: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
INF 2024-04-27 22:35:44,249 uoc2.init:201 GL_MAX_TEXTURE_IMAGE_UNITS: 32
INF 2024-04-27 22:35:44,249 uoc2.init:204 GL_MAX_TEXTURE_SIZE: 32768
INF 2024-04-27 22:35:44,252 uoc2.init:207 GL_ARB_gpu_shader5: True
INF 2024-04-27 22:35:44,252 uoc2.init:210 GL_EXT_texture_filter_anisotropic: True
INF 2024-04-27 22:35:44,252 uoc2.init:214 GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: 16.0
INF 2024-04-27 22:35:44,252 uoc2.init:227 OpenGL context: 3.3
INF 2024-04-27 22:35:44,252 uoc2.init:231 Double-buffered: True
INF 2024-04-27 22:35:44,252 uoc2.init:235 Accelerated: True
INF 2024-04-27 22:35:44,380 uoc2.init:148 Displaying splash screen
INF 2024-04-27 22:35:44,430 engine.gl.textures:156 Initializing ground textures
INF 2024-04-27 22:35:45,736 engine.gl.atlases:87 Loading atlases
INF 2024-04-27 22:35:46,217 uoc2.sounds:35 Loading sounds
INF 2024-04-27 22:35:46,522 uoc2.music:48 Loading music
WAR 2024-04-27 22:35:46,544 uoc2.music:72 empty playlist: campaign_blitzkrieg
WAR 2024-04-27 22:35:46,544 uoc2.music:72 empty playlist: game_nonphasing_blitzkrieg
WAR 2024-04-27 22:35:46,544 uoc2.music:72 empty playlist: game_phasing_barbarossa
WAR 2024-04-27 22:35:46,544 uoc2.music:72 empty playlist: game_phasing_stalingrad
WAR 2024-04-27 22:35:46,544 uoc2.music:72 empty playlist: game_nonphasing_stalingrad
WAR 2024-04-27 22:35:46,545 uoc2.music:72 empty playlist: campaign_stalingrad
WAR 2024-04-27 22:35:46,545 uoc2.music:72 empty playlist: game_nonphasing_fox
WAR 2024-04-27 22:35:46,545 uoc2.music:72 empty playlist: campaign_fox
INF 2024-04-27 22:35:46,556 engine.gl.shader_manager:46 Initializing shader groups
INF 2024-04-27 22:35:46,655 engine.gl.model_manager:75 Loading models
INF 2024-04-27 22:35:48,475 engine.gl.renderer2d:447 Initializing Renderer2D
INF 2024-04-27 22:35:48,480 tools.localization:93 Loading locale
INF 2024-04-27 22:35:48,993 engine.ui.tooltips:202 Loading tooltips
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 Traceback (most recent call last):
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 File "uoc2-exe.py", line 17, in <module>
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 File "C:\Code\uoc2\uoc2\main.py", line 295, in main
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 File "C:\Code\uoc2\uoc2\main_screen\ctrl.py", line 31, in <module>
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 File "C:\Code\uoc2\uoc2\common\cache.py", line 19, in <module>
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 File "C:\Code\uoc2\engine\gl\batcher.py", line 16, in <module>
ERR 2024-04-27 22:35:49,050 uoc2-exe:24 ModuleNotFoundError: No module named 'utilities'
tomislav.uzelac  [developer] Apr 27, 2024 @ 10:02pm 
Hi, please add an exception for "uoc2.exe" to your antivirus software.

Then, restart your computer and run "verify integrity of local files" on Steam:
https://help.steampowered.com/en/faqs/view/0C48-FCBD-DA71-93EB

Cheers!
monke_pooper Apr 27, 2024 @ 11:23pm 
Thanks for the reply
I did all that but after verifying the files I got a “disk write error” and can’t even run the game anymore it just keeps giving me that error. I tried clearing the download cache and repairing the library but it didn’t work.

Thanks for any help
tomislav.uzelac  [developer] Apr 28, 2024 @ 4:24am 
Hi, the game's installation folder could still be write-protected as a result of the earlier "false positive" finding by your antivirus software.

I would suggest restarting Steam, and also restarting the PC before you give up.

Cheers!
monke_pooper Apr 28, 2024 @ 7:15am 
Hey, I restarted steam and my pc and i could launch the game again, but I still get the python error. I looked in the log again and this thing came up

ERR 2024-04-28 10:11:27,332 uoc2-exe:24 File "uoc2-exe.py", line 17, in <module>
ERR 2024-04-28 10:11:27,332 uoc2-exe:24 File "C:\Code\uoc2\uoc2\main.py", line 295, in main
ERR 2024-04-28 10:11:27,332 uoc2-exe:24 File "C:\Code\uoc2\uoc2\main_screen\ctrl.py", line 31, in <module>
ERR 2024-04-28 10:11:27,333 uoc2-exe:24 File "C:\Code\uoc2\uoc2\common\cache.py", line 19, in <module>
ERR 2024-04-28 10:11:27,333 uoc2-exe:24 File "C:\Code\uoc2\engine\gl\batcher.py", line 16, in <module>
ERR 2024-04-28 10:11:27,333 uoc2-exe:24 ModuleNotFoundError: No module named 'utilities'

Is the module something that is created on launch? I don't seem to have it or it doesn't seem to be working
Any Ideas?
tomislav.uzelac  [developer] Apr 28, 2024 @ 8:32am 
Hi, the utilities module is a part of the game's installation, it should be in a subfolder of the game's Steam installation folder, like this:

bin\win64\utilities.cp311-win_amd64.pyd

If the file is not there, perhaps "verify integrity" was not able to restore it properly. I would try running "verify integrity" once more.

Cheers!
monke_pooper Apr 28, 2024 @ 12:46pm 
Hey man I figured it out, even though I made an exception for uoc.2 in my antivirus, for some reason it was still deleting "bin\win64\utilities.cp311-win_amd64.pyd" however since I made the exception in the antivirus it was stopping halfway through, meaning it didn't notify me that antivirus did anything, but also the file was corrupted and the game wouldn't run.
I just had to automatically restore the file from the antivirus and delete the corrupted one in the win64 folder.

Thanks for your help
< >
Showing 1-7 of 7 comments
Per page: 1530 50