![]() |
#1
|
|||
|
|||
EXE file is unable to update/create CSV file
Hi
We have developed Vizard based code (on Vizard 7), which creates and updates CSV file. On the Vizard IDE the code is working fine and is able to modify CSV. However, when same code is exported as EXE using "Export as EXE" option on Vizard, it is unable to create/modify the CSV file. We have checked permissions:
Below is the file handling code we are using. Please provide your valuable response. Code:
try: # Save the demographic information to a CSV file (assuming "data" folder exists) with open('data/demographic_info.csv', 'a', newline='') as csvfile: fieldnames = ['name', 'age', 'gender', 'handedness'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() # Write header if file is empty demographics['gender'] = ['Male', 'Female', 'Other'][demographics['gender'] - 1] demographics['handedness'] = ['Left Handed', 'Right Handed'][demographics['handedness'] - 1] writer.writerow(demographics) text = viz.addText3D(f"Success", parent=viz.SCREEN) # ... (rest of success message) except Exception as e: print(f"Error writing to CSV: {e}") # Print the specific error text = viz.addText3D(f"Error: Writing to CSV", parent=viz.SCREEN) |
Tags |
csv, exe, filehandling, vizard7 |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fade in and fade out an audio file | helena35 | Vizard | 5 | 05-30-2016 06:04 AM |
Closing of an imported .py file | Uttama_vizard | Vizard | 2 | 05-04-2010 06:18 AM |
IVEx file extenstion unrecognised. | sindi | Vizard | 2 | 12-10-2009 01:20 AM |
Read file....many issues | Uttama_vizard | Vizard | 9 | 07-08-2008 02:16 PM |
File Management | Uttama_vizard | Vizard | 2 | 07-01-2008 09:44 AM |