nils-soderman/vscode-motionbuilder-utils

Syntax error/ exeption when user error in python script

Closed this issue · 2 comments

Hello,
Thank you very much for your work i'm using it a lot !.

Lately, i got some strange behaviors when dealing with simple mobu python errors.

As soon as there is an error in the triggered script, i get ( in mobu console )

Traceback (most recent call last):
  File "<MotionBuilder>", line 1, in <module>
  File "<string>", line 18
    print(f'Added "{normalized_path}" to sys.path')
                                                 ^
SyntaxError: invalid syntax

Followed by :

Traceback (most recent call last):
  File "<MotionBuilder>", line 1, in <module>
  File "<string>", line 162, in <module>
  File "<string>", line 159, in main
  File "<string>", line 118, in execute_code
  File "<string>", line 85, in format_exception
AttributeError: 'exceptions.AttributeError' object has no attribute '__traceback__'

MotionBuilder 2018.

It could be something we changed in our pipeline but after some investigations i doubt it.

Maybe this ring a bell ?

thank you

Ah, I didn't test the latest changes in Python 2.7
I'll push a fix for this in the coming days, thanks for reporting!

Cheers,
Nils

Hi,
I've now published 2025.1.1 fixing these issues + a few more that I found while using Python 2.