Python Forum
I can't write my data to the data file , Why?
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't write my data to the data file , Why?
#2
Your indentation is messed up, so it's really difficult (...or impossible) to guess what your code actually looks like. But from what's been shared, nothing is written to the file, because you only try writing to the file if there's an error, but AFTER a break statement, which means nothing would ever be written, regardless of error states.
Reply


Messages In This Thread
RE: I can't write my data to the data file , Why? - by nilamo - Jan-08-2019, 10:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What does .flush do? How can I change this to write to the file? Pedroski55 3 334 Apr-22-2024, 01:15 PM
Last Post: snippsat
  encrypt data in json file help jacksfrustration 1 326 Mar-28-2024, 05:16 PM
Last Post: deanhystad
  Help with to check an Input list data with a data read from an external source sacharyya 3 523 Mar-09-2024, 12:33 PM
Last Post: Pedroski55
  Last record in file doesn't write to newline gonksoup 3 516 Jan-22-2024, 12:56 PM
Last Post: deanhystad
  write to csv file problem jacksfrustration 11 1,720 Nov-09-2023, 01:56 PM
Last Post: deanhystad
  python Read each xlsx file and write it into csv with pipe delimiter mg24 4 1,658 Nov-09-2023, 10:56 AM
Last Post: mg24
  Input network device connection info from data file edroche3rd 6 1,176 Oct-12-2023, 02:18 AM
Last Post: edroche3rd
  Convert File to Data URL michaelnicol 3 1,304 Jul-08-2023, 11:35 AM
Last Post: DeaD_EyE
  How do I read and write a binary file in Python? blackears 6 7,459 Jun-06-2023, 06:37 PM
Last Post: rajeshgk
Video doing data treatment on a file import-parsing a variable EmBeck87 15 3,057 Apr-17-2023, 06:54 PM
Last Post: EmBeck87

Forum Jump:

User Panel Messages

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