In the Python Script (2:1) I'm seeing the above error; I have someting like [very much simplified] :
def MyFunc(mol):
global input_table_2 #Error with or without this line
queries_mols = input_table_2['Smarts']
<do stuff>
return result
m = input_table_1['target']
op = MyFunc(m)
Both input_table_1 and input_table_2 are listed in the workspace window.
In reality, MyFunc is being called via another function.