Python Forum
Internal Server Error 500 on creating .py file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Internal Server Error 500 on creating .py file
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help creating shell scrip for python file marciokoko 10 1,363 Sep-16-2023, 09:46 PM
Last Post: snippsat
  Timestamp of file changes if a share mapped to a server…. tester_V 34 3,941 Jul-04-2023, 05:19 AM
Last Post: tester_V
  Trying to access excel file on our sharepoint server but getting errors cubangt 0 815 Feb-16-2023, 08:11 PM
Last Post: cubangt
  Creating csv files from Excel file azizrasul 40 5,599 Nov-03-2022, 08:33 PM
Last Post: azizrasul
  How to modify python script to append data on file using sql server 2019? ahmedbarbary 1 1,223 Aug-03-2022, 06:03 AM
Last Post: Pedroski55
  Server Folder Error : WinError5 Access Denied fioranosnake 1 1,123 Jun-21-2022, 11:11 PM
Last Post: Larz60+
  Creating file with images BobSmoss 1 1,387 Jan-08-2022, 08:46 PM
Last Post: snippsat
  creating python server and client in a pc kucingkembar 4 2,016 Nov-29-2021, 01:37 PM
Last Post: kucingkembar
  web socket server handle onnection closed abnormally [internal]) korenron 0 2,148 Sep-23-2021, 09:26 AM
Last Post: korenron
  Error creating database with python and form? shams 3 2,372 Aug-02-2021, 02:00 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020