I have solved the loop error, changing script runtime version to 3.5 as suggested, thank you for that.
I have updated to versión 2018.3 recently and I can't even import substances anymore.
Is there any release date for version 2.2?
THank you for replying, guys