Created 02-11-2016 01:41 PM
I am working through this tutorial and I'm encountering the error shown below. I see that others have experienced it to from looking at the comments below the walk through. I believe I have successfully completed this tutorial before. Any ideas on how to resolve this?
[root@sandbox home]# python generate_logs.pyFile “generate_logs.py”, line 98return resultsSyntaxError: ‘return’ outside function
Created 02-11-2016 02:50 PM
Just downloaded and ran the generate_logs file in the sandbox and it works fine for me. Are you sure you didn't modify the script somehow? Sometimes python is very sensitive to tab changes. Its easy for a return to suddenly be a couple characters more to the left or right and with that not in the function anymore.
Created 02-11-2016 04:24 PM
Seriously no idea. Last attempt here is my script: generate-logspy.zip
But I swear I just downloaded it from the url you added
Created 02-11-2016 04:29 PM
@Benjamin Leonhardi Me either. Just replaced my file with yours and receive the same error about line 98 which I would have received before commenting out the return statement on that line
Created 02-11-2016 04:30 PM
A poltergeist? I don't have a line 98, neither in Macos nor in linux.