Python Forum

Full Version: Internal Server Error 500 on creating .py file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

When i try to create a simple .py file with one line input i get an error 500. But the file is created and the rest of the script isnt runned through. I run the following code where the error occurs:
try:
        f2 = open("alpha/alpha/settings_inspectdbF.py", 'w')
        f2.write('test')
        logging.info(f2)
        f2.close()
    except Exception as e:     # most generic exception you can catch
        logging.debug(e)
    finally:
        # optional clean up code
        pass
On my Localhost everything works fine:
On my Server everything works as well but i get an Error 500. The File will be created and correctly. I have searched through the whole internet and havent found a solution yet. Maybe someon here can help me.