Aug-08-2018, 04:46 PM
In your code, it seems that
new_name
is only defined if some conditions have occurred: a line starting with /54/
is needed before, and num in pj
needs to be satisfied, perhaps other conditions that we don't see. The error probably means that some of these necessary conditions failed. You could perhaps writenew_name = 'DEFAULT_NAME'at the top of the file to see if this name is used.