Python why does it happen?!

Users who are viewing this thread

tavener

Regular
Can anyone tell me why this happens? I have the module and installed python correclty (I think). If you think I don't have installed it correct, is there someway to try python if it works fine?

Here is the problem anyway:

    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: 'C:/Program Files/Mount&Blade/Modu
les/Native/strings.txt'
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: 'C:/Program Files/Mount&Blade/Modu
les/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: 'C:/Program Files/Mount&Blade/Modu
les/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: 'C:/Program Files/Mount&Blade/Modu
les/Native/actions.txt'
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: 'C:/Program Files/Mount&Blade/Modu
les/Native/meshes.txt'
Exporting sounds...
Traceback (most recent call last):
  File "process_sounds.py", line 49, 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: 'C:/Program Files/Mount&Blade/Modu
les/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: 'C:/Program Files/Mount&Blade/Modu
les/Native/skins.txt'
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_factions.py", line 2, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 59, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Exporting troops data
Traceback (most recent call last):
  File "process_troops.py", line 105, 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: 'C:/Program Files/Mount&Blade/Modu
les/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: 'C:/Program Files/Mount&Blade/Modu
les/Native/particle_systems.txt'
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
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: 'C:/Program Files/Mount&Blade/Modu
les/Native/party_templates.txt'
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
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: 'C:/Program Files/Mount&Blade/Modu
les/Native/quests.txt'
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\p
rocess_operations.py", line 15, in <module>
    from module_factions import *
  File "C:\Program Files (x86)\Mount&Blade\Modules\Test, Factions\ModuleSystem\m
odule_factions.py", line 44
    ("kingdom_2",  "Kingdom of Vaegirs",    0, 0.9, [("outlaws",-0.05),("peasant
_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandit
s", -0.05)],("kingdom_1",-100.00)], [], 0x33DD33),


                                ^
SyntaxError: invalid syntax

______________________________

Script processing has ended.
Press any key to exit. . .

thanks
 
Invalid syntax usually means you didn't place a comma somewhere or something like that.
 
Rize said:
Invalid syntax usually means you didn't place a comma somewhere or something like that.

So you mean it's not correclty edited in the Environment variables?

this is what I typed:

1:

2:
 
Where did you install M&B?

If it's different than C:/Program Files/Mount&Blade/
Go into module_info and change it to your module folder.
 
take a look at Jiks tutorial in my signature, it covers most of the basic installation points.

one point i discovered while installing is that if you have python installed somewhere, say in D drive like i do the path in enviromental variables needs to be change to the instal location
 
Well first of all. You set the C:\Python26 in the start of the line. It should be in the end of it. But that isn't the biggest problem. Also check if you are using the latest module system, check if you actually placed the python folder dirrectly in "C". And stuff like that.
 
OK but if you've placed the Modulesystem in a mod folder should you change the path to that directory?

Exampel:

Modulesystem goes to --> Native

Path --> C:\Program Files (x86)\Mount&Blade\Modules\Native\modulesystem\

?

ty.
 
No. The path setting is for Python.

You can place module system any where. I prefer it to be in the same place as my temp output folder.

In Window Vista, I would prefer the MS on my desktop.

Another seperate path setting is in module_info.py where you set the destination for your output files (the text files your get after compiling the pys files).
 
SPD_Phoenix said:
No. The path setting is for Python.

You can place module system any where. I prefer it to be in the same place as my temp output folder.

In Window Vista, I would prefer the MS on my desktop.

Another seperate path setting is in module_info.py where you set the destination for your output files (the text files your get after compiling the pys files).

Weird... I changed the path where python is installed, but still error -_-'
 
No, do this i think this will work... open the module system and look for module_info.py open it and where you see the directory set it to the module you are using (native or whatever) and don't forget to use forward slashes not backward (cause a lot of frustration to me :grin:) / not \

C:\Program Files (x86)\Mount&Blade\Modules\Native\modulesystem\  Wrong

C:/Program Files/Mount&Blade/Modules/Native/modulesystem/  Right (why are you typing the (x86).. that shouldnt be there.. it should only say program files i think)
If this doesn't work then add the x86 :grin: maybe it fixes it! :grin: gl

BTW if you didn't notice on the module_info.py script there is a paragraph with red letters! (read them next time, it helps with scripting)

Cheers,
MISHO
 
MISHO said:
No, do this i think this will work... open the module system and look for module_info.py open it and where you see the directory set it to the module you are using (native or whatever) and don't forget to use forward slashes not backward (cause a lot of frustration to me :grin:) / not \

C:\Program Files (x86)\Mount&Blade\Modules\Native\modulesystem\  Wrong

C:/Program Files/Mount&Blade/Modules/Native/modulesystem/  Right (why are you typing the (x86).. that shouldnt be there.. it should only say program files i think)
If this doesn't work then add the x86 :grin: maybe it fixes it! :grin: gl

BTW if you didn't notice on the module_info.py script there is a paragraph with red letters! (read them next time, it helps with scripting)

Cheers,
MISHO

Thanks but still it dosn't work >.<
 
C:/Program Files/Mount&Blade/Modules/Native/modulesystem/
This is the path to your module system source files (or export path). This does not do anything for Python path setting.

I don't use environment variables. I set it in system variables. Your system variables setting seems to be correct (I would put Python path last).

The original error messages seem to relate to Windows Vista and protected files/area (can not write output files to destination). Try to change the output destination to some where else such as your desktop. Then change the export path such as

export_dir = "C:/user/username/Desktop/MyMod/"
(You can get the full path of the folder on your desktop by right click it and select properties)

Note: I don't use Windows Vista, so I'm not sure about all details.

 
Aargh!! **** it! Thanks for your help man but this wont just work or I'm to ****in stupid  :lol:

Thanks all.
 
no msn is to ****ing stupid. Since it want alow me to do remote control with me... annoying piece of program ****.
 
Back
Top Bottom