Author Topic: BSOD - ImportError: No module named BajoranAssault  (Read 1362 times)

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
BSOD - ImportError: No module named BajoranAssault
« on: December 22, 2007, 04:53:32 PM »
Or so im guessing thats the problem.

All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
RE: BSOD - ImportError: No module named BajoranAssault
« Reply #1 on: December 22, 2007, 06:31:29 PM »
It's basicly saying that you don't have one of the required ships installed.
In this case, the Bajoran Assault ship.
What mod were you trying out?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
RE: BSOD - ImportError: No module named BajoranAssault
« Reply #2 on: December 22, 2007, 09:27:28 PM »
Everything is there though as you can see.

Quote
##### Created by:
##### Bridge Commander Ship Menu Creator v4.0

import App
import Foundation

abbrev = 'BajoranAssault'
iconName = 'PeragrineF1'
longName = 'Bajoran Assault'
shipFile = 'BajoranAssault'
species = App.SPECIES_GALAXY
# SubMenu
menuGroup = 'Other Ships'
playerMenuGroup = 'Other Ships'

Foundation.ShipDef.BajoranAssault = Foundation.ShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })

Foundation.ShipDef.BajoranAssault.fMaxWarp = 9.0 + 0.0 # 0.0 makes sure that the number is a decimal number
Foundation.ShipDef.BajoranAssault.fCruiseWarp = 6.0 + 0.0 # 0.0 makes sure that the number is a decimal number
Foundation.ShipDef.BajoranAssault.desc = 'No Description'

if menuGroup: Foundation.ShipDef.BajoranAssault.RegisterQBShipMenu(menuGroup)
if playerMenuGroup: Foundation.ShipDef.BajoranAssault.RegisterQBPlayerShipMenu(playerMenuGroup)

if Foundation.shipList._keyList.has_key(longName):
Foundation.ShipDef.__dict__[longName].friendlyDetails[2] = Foundation.shipList[longName].friendlyDetails[2]
Foundation.ShipDef.__dict__[longName].enemyDetails[2] = Foundation.shipList[longName].enemyDetails[2]

Quote
import App
import Multiplayer.SpeciesToShip
def GetShipStats():
kShipStats = {
"FilenameHigh": "data/Models/Ships/BajoranAssaultVessel/BajoranAssault.nif",
"FilenameMed": "data/Models/Ships/BajoranAssaultVessel/BajoranAssault.nif",
"FilenameLow": "data/Models/Ships/BajoranAssaultVessel/BajoranAssault.nif",
"Name": "BajoranAssaultVessel",
"HardpointFile": "BajoranAssault",
"Species": Multiplayer.SpeciesToShip.GALAXY
}
return kShipStats
def LoadModel(bPreLoad = 0):
pStats = GetShipStats()
# Create the LOD info
if (not App.g_kLODModelManager.Contains(pStats["Name"])):
# Params are: File Name, PickLeafSize, SwitchOut Distance,
# Surface Damage Res, Internal Damage Res, Burn Value, Hole Value,
# Search String for Glow, Search string for Specular, Suffix for specular
pLODModel = App.g_kLODModelManager.Create(pStats["Name"])
pLODModel.AddLOD(pStats["FilenameHigh"], 10, 200.0, 15.0, 15.0, 400, 900, "_glow", None, "_spec")
pLODModel.AddLOD(pStats["FilenameMed"], 10, 400.0, 15.0, 15.0, 400, 900, "_glow", None, "_spec")
pLODModel.AddLOD(pStats["FilenameLow"], 10, 800.0, 15.0, 30.0, 400, 900, "_glow", None, None)
# kDebugObj = App.CPyDebug()
if (bPreLoad == 0):
pLODModel.Load()
# kDebugObj.Print("Loading " + pStats["Name"] + "\n")
else:
pLODModel.LoadIncremental()
# kDebugObj.Print("Queueing " + pStats["Name"] + " for pre-loading\n")
def PreLoadModel():
LoadModel(1)







Some possibilities but I can't see anything(which is odd for me).

Quote
Usually scripts/ships, but could also be custom/ships. Make sure the paths to the model are correctly spelt and using the same case (ie every capital letter in the actual path to the filename, as well as the filename, must be a capital letter in the path written in the pointer script etc). Make sure if it suggests there should be high, low and medium resolution models that they are either there (even if they are the same model) or the request gets deleted. Computers are very pedantic things and its the easiest thing in the world to look at a script you've just written and simply not noticed a tiny mistake. The computer will notice it.

http://www.bckobayashimaru.de/phpBB3/viewtopic.php?f=30&t=1799

http://forums.filefront.com/st-bc-problems-errors-help/339929-now-what.html
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
RE: BSOD - ImportError: No module named BajoranAssault
« Reply #3 on: December 23, 2007, 06:20:30 AM »
It's complaining about the ship file, so under scripts/ships.
Do you have a scripts/ships/BajoranAssault.py?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
RE: BSOD - ImportError: No module named BajoranAssault
« Reply #4 on: December 23, 2007, 01:43:28 PM »
The hardpoints file is BajoranAssault but the ships file is BajoranAssaultVessel wtf? So I would just remove "Vessel" from both the py and pyc and thats it or would I need to change it in the custom py too?
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
RE: BSOD - ImportError: No module named BajoranAssault
« Reply #5 on: December 23, 2007, 02:15:51 PM »
Assuming you don't simply miss the ship, I would recommend copying (not renaming, since another ship might be using that one) the scripts/Ships/BajoranAssaultVessel.py to scripts/Ships/BajoranAssault.py and then try again.
Of course, it's possible that the hardpoint name is also named wrong. But we'll have to see if that's the case when you try it.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
RE: BSOD - ImportError: No module named BajoranAssault
« Reply #6 on: December 23, 2007, 02:25:50 PM »
Trying it now...

EDIT: It works now! Thanks!
All hail the messiah!