Author Topic: Help with this error please - File ".\Scripts\Custom\QBautostart\FleetUtils.py", line 462 pSequence = App.TGSequence_Create(): ^ SyntaxError: invalid token  (Read 1424 times)

Offline gtillmon

  • Posts: 20
  • Cookies: 0
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

Offline ACES_HIGH

  • BCC Roleplay Game Narrator
  • Moderator
  • Posts: 1678
  • Cookies: 54
  • while(!(succeed=try()));
    • BCC Roleplay Games

Offline gtillmon

  • Posts: 20
  • Cookies: 0
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

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
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 gtillmon

  • Posts: 20
  • Cookies: 0
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

Offline ACES_HIGH

  • BCC Roleplay Game Narrator
  • Moderator
  • Posts: 1678
  • Cookies: 54
  • while(!(succeed=try()));
    • BCC Roleplay Games
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?


Offline ACES_HIGH

  • BCC Roleplay Game Narrator
  • Moderator
  • Posts: 1678
  • Cookies: 54
  • while(!(succeed=try()));
    • BCC Roleplay Games

Offline gtillmon

  • Posts: 20
  • Cookies: 0
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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
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?
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 gtillmon

  • Posts: 20
  • Cookies: 0
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

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Mleo you just fixed 1 out of 7-8 indentation errors.

Gotta love PyLint.

Who has been playing with this script?
Acta, non verba.
aka USS Sovereign

Offline gtillmon

  • Posts: 20
  • Cookies: 0
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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
It isn't the fault of an editor per-say.

Python defines scoping through indentation, so it's important to keep it consistent.
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 gtillmon

  • Posts: 20
  • Cookies: 0
Again, thanks all!

All of your help is greatly appreciated.