Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Issue with Converting XML File to CSV

Hi,

you may want to call the script function directly for better debugging:

  • add the tools directory to the path:  sys.path.append(os.path.join(os.environ['SUMO_HOME'], 'tools'))
  • import the xml2csv script
  • call the main function of xml2csv with the arguments you want
Best regards
Mirko

Am 28.01.2025 um 16:23 schrieb Sumaira shaheen via sumo-user:
Hi,

I want to convert my XML file to CSV. Both my XML and CSV files are in the same folder. However, it is neither giving me any errors nor converting the XML file to CSV. If the XML file is successfully converted, I will be able to proceed with my next code.

E2detectors_output_xmls =[file for file in os.listdir(r"E2Detectors_Results/Output/Lane A") if file.endswith('.xml')]
for xml_file in E2detectors_output_xmls:
print(xml_file)
os.system(r"python xml2csv.py E2Detectors_Results\Output\Lane A\\{xml_file}")

Could you please assist me in resolving this issue?

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top