Module Development > The Forge - Mod Development
How to fix "Python not recognized..." (now also for Windows 7)
Cjkjvfnby:
--- Quote from: wehrmacht on November 22, 2011, 05:09:36 PM ---Initializing
Variables.txt not found. Creating new variables.txt file
.
File "process_postifx.py" , line 13, in write_postfix_params
ofile = open<export_dir + "postfix.txt","w">
IoError: [Errno 2] No such file or directory: '../WOTS/modules/native/postfx.txt
What is this? please help me. there is the first and the last sentence.
--- End quote ---
Look like file or directory not found. :) Propably ../WOTS/modules/native/ does not exists. Check if you <export_dir> exists (module_info.py)
Batchuba:
Hi, I have been following the instructions quite faithfully, but have ran into a problem.
At the point of:
module_info.py Edit with IDLE
I am not sure what to put in the two export_dir entries.
The instructions say:
export_dir = "C:/Program Files/Mount&Blade/Modules/MyNewModule/"
I noticed my module was elsewhere, so I accurately put: "C:/Program Files/Steam/steamapps/common/mountblade warband/Modules/The100Mod/"
----------------------------------------------------
However, there are two export_dir entries when you Edit with IDLE, so mine looks like this;
export_dir = "../WOTS/Modules/Native/"
#export_dir = "C:/Program Files/Steam/steamapps/common/mountblade warband/Modules/The100Mod/"
--------------------------------------------------
I am not sure whether this is correct and may be the cause of the following error message :
--- Code: ---Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Traceback (most recent call last):
File "process_global_variables.py", line 106, in <module>
save_variables(export_dir, variables,variable_uses)
File "C:\Users\Aodh\Downloads\mb_warband_module_system_1143\Module_system 1.14
3\process_operations.py", line 171, in save_variables
file = open(export_dir + "variables.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/variables.
txt'
Exporting strings...
Traceback (most recent call last):
File "process_strings.py", line 26, in <module>
save_strings(strings)
File "process_strings.py", line 9, in save_strings
ofile = open(export_dir + "strings.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/strings.tx
t'
Exporting skills...
Traceback (most recent call last):
File "process_skills.py", line 32, in <module>
save_skills()
File "process_skills.py", line 15, in save_skills
ofile = open(export_dir + "skills.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/skills.txt
'
Exporting tracks...
Traceback (most recent call last):
File "process_music.py", line 23, in <module>
save_tracks()
File "process_music.py", line 15, in save_tracks
file = open(export_dir + "music.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/music.txt'
Exporting animations...
Traceback (most recent call last):
File "process_animations.py", line 61, in <module>
write_actions(animations,len(action_codes),action_codes,"actions.txt")
File "process_animations.py", line 24, in write_actions
file = open(export_dir + file_name,"w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/actions.tx
t'
Exporting meshes...
Traceback (most recent call last):
File "process_meshes.py", line 25, in <module>
save_meshes()
File "process_meshes.py", line 9, in save_meshes
ofile = open(export_dir + "meshes.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/meshes.txt
'
Exporting sounds...
Traceback (most recent call last):
File "process_sounds.py", line 51, in <module>
write_sounds(sound_samples, sounds)
File "process_sounds.py", line 13, in write_sounds
ofile = open(export_dir + "sounds.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/sounds.txt
'
Exporting skins...
Traceback (most recent call last):
File "process_skins.py", line 105, in <module>
export_skins(skins)
File "process_skins.py", line 45, in export_skins
ofile = open(export_dir + "skins.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/skins.txt'
Exporting map icons...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_map_icons.py", line 38, in <module>
save_map_icons(variables,variable_uses,tag_uses,quick_strings)
File "process_map_icons.py", line 9, in save_map_icons
ofile = open(export_dir + "map_icons.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/map_icons.
txt'
Exporting faction data...
Traceback (most recent call last):
File "process_factions.py", line 70, in <module>
save_factions(relations)
File "process_factions.py", line 34, in save_factions
file = open(export_dir + "factions.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/factions.t
xt'
Exporting item data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_items.py", line 72, in <module>
write_items(variables,variable_uses,tag_uses,quick_strings)
File "process_items.py", line 19, in write_items
ofile = open(itemkinds_file_name,"w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/item_kinds
1.txt'
Exporting scene data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_scenes.py", line 77, in <module>
save_scenes(variables,variable_uses,tag_uses)
File "process_scenes.py", line 46, in save_scenes
ofile = open(export_dir + "scenes.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/scenes.txt
'
Exporting troops data
Traceback (most recent call last):
File "process_troops.py", line 107, in <module>
save_troops()
File "process_troops.py", line 13, in save_troops
file = open(export_dir + "troops.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/troops.txt
'
Exporting particle data...
Traceback (most recent call last):
File "process_particle_sys.py", line 61, in <module>
save_particle_systems()
File "process_particle_sys.py", line 29, in save_particle_systems
ofile = open(export_dir + "particle_systems.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/particle_s
ystems.txt'
Exporting scene props...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_scene_props.py", line 32, in <module>
save_scene_props(variables,variable_uses,tag_uses,quick_strings)
File "process_scene_props.py", line 10, in save_scene_props
ofile = open(export_dir + "scene_props.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/scene_prop
s.txt'
Exporting tableau materials data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_tableau_materials.py", line 31, in <module>
save_tableau_materials(variables,variable_uses,tag_uses,quick_strings)
File "process_tableau_materials.py", line 11, in save_tableau_materials
ofile = open(export_dir + "tableau_materials.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/tableau_ma
terials.txt'
Exporting presentations...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_presentations.py", line 33, in <module>
save_presentations(variables,variable_uses,tag_uses,quick_strings)
File "process_presentations.py", line 11, in save_presentations
ofile = open(export_dir + "presentations.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/presentati
ons.txt'
Exporting party_template data...
Traceback (most recent call last):
File "process_party_tmps.py", line 46, in <module>
save_party_templates()
File "process_party_tmps.py", line 20, in save_party_templates
file = open(export_dir + "party_templates.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/party_temp
lates.txt'
Exporting parties
Creating new tag_uses.txt file...
Traceback (most recent call last):
File "process_parties.py", line 69, in <module>
save_parties(parties)
File "process_parties.py", line 12, in save_parties
file = open(export_dir + "parties.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/parties.tx
t'
Exporting quest data...
Traceback (most recent call last):
File "process_quests.py", line 30, in <module>
save_quests()
File "process_quests.py", line 9, in save_quests
ofile = open(export_dir + "quests.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/quests.txt
'
Exporting info_page data...
Traceback (most recent call last):
File "process_info_pages.py", line 26, in <module>
save_info_pages()
File "process_info_pages.py", line 9, in save_info_pages
ofile = open(export_dir + "info_pages.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/info_pages
.txt'
Exporting scripts...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_scripts.py", line 40, in <module>
save_scripts(variables,variable_uses,scripts,tag_uses,quick_strings)
File "process_scripts.py", line 10, in save_scripts
file = open(export_dir + "scripts.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/scripts.tx
t'
Exporting mission_template data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_mission_tmps.py", line 64, in <module>
save_mission_templates(variables,variable_uses,tag_uses,quick_strings)
File "process_mission_tmps.py", line 38, in save_mission_templates
file = open(export_dir + "mission_templates.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/mission_te
mplates.txt'
Exporting game menus data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_game_menus.py", line 47, in <module>
save_game_menus(variables,variable_uses,tag_uses,quick_strings)
File "process_game_menus.py", line 22, in save_game_menus
ofile = open(export_dir + "menus.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/menus.txt'
exporting simple triggers...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_simple_triggers.py", line 24, in <module>
save_simple_triggers(variables,variable_uses,simple_triggers,tag_uses,quick_
strings)
File "process_simple_triggers.py", line 8, in save_simple_triggers
file = open(export_dir + "simple_triggers.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/simple_tri
ggers.txt'
exporting triggers...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
File "process_dialogs.py", line 199, in <module>
save_triggers(variables,variable_uses,triggers,tag_uses,quick_strings)
File "process_dialogs.py", line 47, in save_triggers
file = open(export_dir + "triggers.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/triggers.t
xt'
Checking global variable usages...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Exporting postfx_params...
Traceback (most recent call last):
File "process_postfx.py", line 27, in <module>
write_postfx_params(postfx_params)
File "process_postfx.py", line 13, in write_postfx_params
ofile = open(export_dir + "postfx.txt","w")
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native/postfx.txt
'
______________________________
Script processing has ended.
Press any key to exit. . .
---------------------------------------------------
--- End code ---
Can anyone help? Thanks!
Caba`drin:
You need to remove the comment-out hash mark # from your export_dir and add it to the 'example' line...or delete that line entirely.
Batchuba:
Thanks for the unbelievably quick answer!
Ah, so the first export_dir line is an "example line", and the second should replace it in the same format.
EDIT* I had another problem, but never mind, I was unbelievably, forgetting to add (x86) to the end of program files in the file path. Your advice sorted it the issue, and now all is working deliciously.
Thank you very much!
-----------------
Caba`drin:
Yes, that should be correct.
It shouldn't be the same error as before, because it shouldn't be referencing
IOError: [Errno 2] No such file or directory: '../WOTS/Modules/Native
at all because that line is gone.
Most likely, you are now running into Windows UAC blocking your ability to write into the Program Files directory. You can change your folder permissions for the Warband folder (and its sub-folders) or you should compile outside of Program Files (say into Documents somewhere, or a Desktop folder) and then move the compiled .txt files into the Warband\Modules folder afterwards.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version