In application settings I was using the drop-down box to change the Python version.
Once this was changed the error started occurring.
I deleted the function app, and cleared all files from the file storage account, then created a new function app. I tried using the different versions of python to see if it was version related, however the same error kept occurring (even if selecting 2.7). I repeated this for both versions of python in the drop-down and got the same behaviour.
To resolve, I deleted the function app, deleted files from file storage in the storage account, recreated the app, and did not make any selection of the python version (it is set to off).
Even though the python version is set to off, 2.7 is still avaiable for use, as I have been able to write working functions in python.
