The code in strategies/python.py masks errors that occur during the import process. I spent several hours looking into why imports were not working on a remotely managed box and it boiled down to problems with a settings file failing to import.
@staticmethod
def is_valid_file(file_name):
try:
importlib.import_module(file_name)
return True
except (ImportError, TypeError):
return False
Add some logging with the exception to help pinpoint issues.
The code in strategies/python.py masks errors that occur during the import process. I spent several hours looking into why imports were not working on a remotely managed box and it boiled down to problems with a settings file failing to import.
Add some logging with the exception to help pinpoint issues.