Bridge Commander Central
BC Forums => BC Technical Support => Solved Problems => Topic started by: gtillmon on July 01, 2009, 08:34:42 PM
-
Can anyone assist me with correcting this error?
AttributeError: PreLoadAssets
Traceback (innermost last):
File ".\Scripts\Custom\Autoload\000-Fixes20030305-FoundationTriggers.py", line 22, in __call__
i(pObject, pEvent)
File ".\Scripts\Custom\Autoload\LoadEngineeringExtension.py", line 240, in __call__
LoadQBautostart.ImportQBautostart()
File ".\Scripts\Custom\Autoload\LoadEngineeringExtension.py", line 163, in ImportQBautostart
pModule = __import__(dotPrefix + fileName)
ImportError: No module named old
-
try redownloading the latest version of QBAutostart
http://defiant.homedns.org/~erik/STBC/QBautostart/QBautostart-current.zip (http://defiant.homedns.org/~erik/STBC/QBautostart/QBautostart-current.zip)
-
Thanks!!!!
That did the trick.
How about this one, if you please.
inconsistent dedent
Error: was unable to load FleetUtils - SyntaxError: ('invalid token', ('.\\Scripts\\Custom\\QBautostart\\FleetUtils.py', 462, 45, ' pSequence = App.TGSequence_Create():\012'))
Traceback (innermost last):
File ".\Scripts\Custom\Autoload\LoadEngineeringExtension.py", line 157, in ImportQBautostart
File ".\Scripts\Custom\QBautostart\FleetUtils.py", line 462
pSequence = App.TGSequence_Create():
^
SyntaxError: invalid token
-
Open FleetUtils.py and remove the : on line 462.
-
Thanks. I did that. However, I am still having a problem.
inconsistent dedent
Error: was unable to load FleetUtils - SyntaxError: ('invalid token', ('.\\Scripts\\Custom\\QBautostart\\FleetUtils.py', 462, 45, ' pSequence = App.TGSequence_Create() \012'))
Traceback (innermost last):
File ".\Scripts\Custom\Autoload\LoadEngineeringExtension.py", line 157, in ImportQBautostart
File ".\Scripts\Custom\QBautostart\FleetUtils.py", line 462
pSequence = App.TGSequence_Create()
^
SyntaxError: invalid token
-
the way error checkers tend to work, is that the program assumes that the programmer knew what they were doing, so generally, it will try to run faulty code as long as it can, before giving an error message, it's likely that the error lies somewhere above Line 462. could you post the whole .py file?
-
Okay.
File is attached.
-
hmm, did you delete the .pyc after you made the change?
-
Yes, I deleted the pyc file.
The thing is there is still an error on line 462 when I used Python to check the module after I made that change.
I am using Python 2.5 to edit.
-
It was a case of faulty indentation.
I find it a bit odd that it would never have been caught before, did you make a change in the file?
-
Thanks for trying guys, however, it still does not work.
Error: was unable to load FleetUtils - SyntaxError: ('invalid syntax', ('.\\Scripts\\Custom\\QBautostart\\FleetUtils.py', 513, 8, ' for pFriendly in lpFriendlies:\012'))
Traceback (innermost last):
File ".\Scripts\Custom\Autoload\LoadEngineeringExtension.py", line 157, in ImportQBautostart
File ".\Scripts\Custom\QBautostart\FleetUtils.py", line 513
for pFriendly in lpFriendlies:
^
SyntaxError: invalid syntax
-
Mleo you just fixed 1 out of 7-8 indentation errors.
Gotta love PyLint.
Who has been playing with this script?
-
THANKS!!!!! That did it. :D
I was using a Python editor and I could never get the error after the () corrected.
What editor did you use?
Thanks again.
-
It isn't the fault of an editor per-say.
Python defines scoping through indentation, so it's important to keep it consistent.
-
Again, thanks all!
All of your help is greatly appreciated.