Jump to content
Developer Wiki and Function Reference Links ×

errormessages in script editor sometimes misleading


Recommended Posts

Hi,

 

somehow the error messages in the script editor are a bit misleading. Sometimes it happens to me, that the mistake I made in my code are not in the line the error has been found by the ...compiler?... but in the line before.

 

path = (vs.Concat('/Users/matteoneustadt/Desktop/HBK2/',current_date)
ok = vs.IFC_ExportNoUI(path)

for example, there's missing a bracket in the "path" command.

However I get told, that the error is in the line of the "Ifc_ExportNoUI..." line.

 

Maybe there's a logical reason, however not a user friendly reason ;-).

Link to comment

You are right from a user view it makes more sense when the error appears for the first line. But in Python a statement can go to the next line when it is within brackets.

So the python engine realizes that something is wrong when it suddenly sees a declaration in the next line.

 

This is valid for example:

 

print ( "a"
        + "b")

 

Edited by PatW
  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...