• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

Getting an error whenever I try to run build_module

Users who are viewing this thread

I always get the same error whenever I try to run build_module (as the subject clearly suggests), that being
Code:
python: can't open file 'process_init.py': [Errno 2] No such file or directory
python: can't open file 'process_global_variables.py': [Errno 2] No such file or directory
python: can't open file 'process_strings.py': [Errno 2] No such file or directory
python: can't open file 'process_skills.py': [Errno 2] No such file or directory
python: can't open file 'process_music.py': [Errno 2] No such file or directory
python: can't open file 'process_animations.py': [Errno 2] No such file or directory
python: can't open file 'process_meshes.py': [Errno 2] No such file or directory
python: can't open file 'process_sounds.py': [Errno 2] No such file or directory
python: can't open file 'process_skins.py': [Errno 2] No such file or directory
python: can't open file 'process_map_icons.py': [Errno 2] No such file or directory
python: can't open file 'process_factions.py': [Errno 2] No such file or directory
python: can't open file 'process_items.py': [Errno 2] No such file or directory
python: can't open file 'process_scenes.py': [Errno 2] No such file or directory
python: can't open file 'process_troops.py': [Errno 2] No such file or directory
python: can't open file 'process_particle_sys.py': [Errno 2] No such file or directory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or directory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file or directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or directory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_parties.py': [Errno 2] No such file or directory
python: can't open file 'process_quests.py': [Errno 2] No such file or directory
python: can't open file 'process_info_pages.py': [Errno 2] No such file or directory
python: can't open file 'process_scripts.py': [Errno 2] No such file or directory
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or directory
python: can't open file 'process_simple_triggers.py': [Errno 2] No such file or directory
python: can't open file 'process_dialogs.py': [Errno 2] No such file or directory
python: can't open file 'process_global_variables_unused.py': [Errno 2] No such file or directory
python: can't open file 'process_postfx.py': [Errno 2] No such file or directory
Could Not Find C:\windows\system32\*.pyc

Any suggestions?
 

NPC99

Baron
M&BWBWF&SVC
Maybe you've located the folder for your module system in a directory, which requires administrator rights to access. Try moving it to My Documents.
 
NPC99 said:
Maybe you've located the folder for your module system in a directory, which requires administrator rights to access. Try moving it to My Documents.
I've moved it to My Documents and I'm still getting the same error.

EDIT:
I'm also running it as administrator. When I do not run it as an administrator, however, I get this:
  File "process_init.py", line 11
    print "Initializing..."
                          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Initializing...")?
  File "process_global_variables.py", line 29
    add_variable(varb, variable_list, variable_uses)
                                                  ^
TabError: inconsistent use of tabs and spaces in indentation
  File "process_strings.py", line 30
    print "Exporting strings..."
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting strings...")?
  File "process_skills.py", line 36
    print "Exporting skills..."
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting skills...")?
  File "process_music.py", line 27
    print "Exporting tracks..."
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting tracks...")?
  File "process_animations.py", line 64
    print "Exporting animations..."
                                  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting animations...")?
  File "process_meshes.py", line 29
    print "Exporting meshes..."
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting meshes...")?
  File "process_sounds.py", line 55
    print "Exporting sounds..."
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting sounds...")?
  File "process_skins.py", line 110
    print "Exporting skins..."
                            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting skins...")?
  File "process_map_icons.py", line 38
    print "Exporting map icons..."
                                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting map icons...")?
  File "process_factions.py", line 33
    print "ERROR faction not found: "+ rel_name
                                    ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "ERROR faction not found: "+ rel_name)?
  File "process_items.py", line 63
    print "Exporting item data..."
                                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting item data...")?
  File "process_scenes.py", line 18
    print "Exporting scene data..."
                                  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting scene data...")?
  File "process_troops.py", line 113
    print "Exporting troops data"
                                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting troops data")?
  File "process_particle_sys.py", line 66
    print "Exporting particle data..."
                                    ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting particle data...")?
  File "process_scene_props.py", line 32
    print "Exporting scene props..."
                                  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting scene props...")?
  File "process_tableau_materials.py", line 31
    print "Exporting tableau materials data..."
                                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting tableau materials data...")?
  File "process_presentations.py", line 33
    print "Exporting presentations..."
                                    ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting presentations...")?
  File "process_party_tmps.py", line 34
    print "Error! NUMBER OF TEMPLATE MEMBERS EXCEEDS 6 " + party_template[0]
                                                      ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "Error! NUMBER OF TEMPLATE MEMBERS EXCEEDS 6 " + party_template[0])?
  File "process_parties.py", line 34
    print "Error: Unable to find menu-id :" + menu_param
                                          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "Error: Unable to find menu-id :" + menu_param)?
  File "process_quests.py", line 35
    print "Exporting quest data..."
                                  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting quest data...")?
  File "process_scripts.py", line 40
    print "Exporting scripts..."
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting scripts...")?
  File "process_mission_tmps.py", line 35
    print "ERROR: Too many item_overrides!"
                                          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "ERROR: Too many item_overrides!")?
  File "process_game_menus.py", line 47
    print "Exporting game menus data..."
                                      ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Exporting game menus data...")?
  File "process_simple_triggers.py", line 25
    print "exporting simple triggers..."
                                      ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("exporting simple triggers...")?
  File "process_dialogs.py", line 101
    print sentence[ipt_token_pos]
                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print sentence[ipt_token_pos])?
  File "process_global_variables_unused.py", line 11
    print "Checking global variable usages..."
                                            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Checking global variable usages...")?
Could Not Find C:\Users\Maxim\Documents\Module_system 1.166\*.pyc
 

NPC99

Baron
M&BWBWF&SVC
Did you set up your path variable correctly? Check the steps here https://forums.taleworlds.com/index.php/topic,240255.0.html

Alternatively, there's a thread with a similar error message here https://forums.taleworlds.com/index.php?topic=293037.0 but I don't know if the replies solved it.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Makhnovshchyna said:
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Checking global variable usages...")?

you have installed Python 3.x, but the modsys requires Python 2.x. Wrong version.
                               
you also need to be PC administrator (not simple run as admin) to get permission to run a process from your System. You could use a local copy of Python 2.x to replace that call.

See links above for further help.
 
kalarhan said:
Makhnovshchyna said:
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Checking global variable usages...")?

you have installed Python 3.x, but the modsys requires Python 2.x. Wrong version.
                               
you also need to be PC administrator (not simple run as admin) to get permission to run a process from your System. You could use a local copy of Python 2.x to replace that call.

See links above for further help.

The Ultimate Guide to Modding says that I am able to use Python 3.x, given that I tinker with it a bit.
 

NPC99

Baron
M&BWBWF&SVC
Makhnovshchyna said:
kalarhan said:
Makhnovshchyna said:
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Checking global variable usages...")?

you have installed Python 3.x, but the modsys requires Python 2.x. Wrong version.
                               
you also need to be PC administrator (not simple run as admin) to get permission to run a process from your System. You could use a local copy of Python 2.x to replace that call.

See links above for further help.

The Ultimate Guide to Modding says that I am able to use Python 3.x, given that I tinker with it a bit.

Its OP clearly states The ModSys does NOT work with any Python newer than 2.x
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Makhnovshchyna said:
The Ultimate Guide to Modding says that I am able to use Python 3.x, given that I tinker with it a bit.

if you are a programmer and know enough of Python (not a modder that is learning MBScript) you could upgrade the modsys to Python 3.x. Is that the case? Because you are getting a error message that is yelling: "WRONG VERSION DUDE". So that is why I indicated above that you should downgrade to Python 2.x

Cheers
 
Alright so I've got the right python version set up aaaaand
Traceback (most recent call last):
  File "process_init.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables.py", line 7, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_strings.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_skills.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_music.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_animations.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_meshes.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_sounds.py", line 5, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_skins.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_map_icons.py", line 5, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_factions.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_scenes.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_troops.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_particle_sys.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_scene_props.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_tableau_materials.py", line 7, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_presentations.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_party_tmps.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_quests.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_scripts.py", line 6, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_mission_tmps.py", line 7, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 7, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_simple_triggers.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_dialogs.py", line 7, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 4, in <module>
    from module_info import *
  File "C:\Users\Maxim\Documents\Module_system 1.166\module_info.py", line 4
    export_dir = C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Module Playground/
                  ^
SyntaxError: invalid syntax
Could Not Find C:\Users\Maxim\Documents\Module_system 1.166\*.pyc

______________________________

Script processing has ended.
Press any key to exit. . .
 
So I made a slight adjustment to module_info and when I ran build_module, everything was fine. Then I got this; Could Not Find C:\Users\Maxim\Documents\Module_system 1.166\*.pyc
Does this mean it was a success?
 

NPC99

Baron
M&BWBWF&SVC
Check your path variables. See replies 7440, 7441 & 7451 in the following thread https://forums.taleworlds.com/index.php/topic,6575.7440.html
 
NPC99 said:
Check your path variables. See replies 7440, 7441 & 7451 in the following thread https://forums.taleworlds.com/index.php/topic,6575.7440.html
Whenever I try to add ;c:\python27\ as a path variable and press enter, it's automatically deleted.

edit: I don't have the classical sort-of-thing in which the path environment variable is written down in one long line, but instead, this: https://gyazo.com/9ee64b7d02dbdb41e587c511ad0c74e5
 

kalarhan

Python Saint
Count
WBNWVCWF&S
reinstall Python 2.x, you have a option on the installer that will fix your path for you (just look at all options, it is OFF by default)
 
Top Bottom