Can not create CSV file
donsmj opened this issue · 1 comments
donsmj commented
with open(self.datafile, 'a') as csvfile:
OSError: [Errno 22] Invalid argument: 'Thu Apr 11 00:42:22 2019.csv'
This file can not be made for me. Any solutions for that?
cordeirojoao commented
If you're using Windows go the Devol repository, to file devol/devol.py
and change the following line of code
self.datafile = data_path or (datetime.now().ctime() + '.csv')
to
self.datafile = data_path or (datetime.now().ctime() + '.csv').replace(":", "_").replace(" ", "_")
The problem is the current library is using : and spaces on files names, and Windows have issues on that
Meanwhile a simpler solution
Change your code to
devol = DEvol(genome_handler, "Devol_file")