RuntimeError: 'NEAT' section not found in NEAT configuration file

130 Views Asked by At

I'm trying to run a program using neat-python but I'm getting this error constantly. I checked the file it has the neat section and also I tried to uninstall and reinstall neat but nothing works.

P.S I'm using VSCode

Here's the code I'm trying to run

\

def run(config_path):
 config =neat.config.Config(neat.DefaultGenome, neat.DefaultReproduction,neat.DefaultSpeciesSet,      neat.DefaultStagnation,config_path)
 p = neat.Population(config)
 p.add_reporter(neat.StdOutReporter(True))
 stats = neat.StatisticsReporter()
 p.add_reporter(stats)
`
    winner = p.run(main, 50)

if __name__ == '__main__':
 local_dir = os.path.dirname(__file__)
 config_path = os.path.join(local_dir, 'config-feedforward.txt')
 run(config_path)\`
1

There are 1 best solutions below

0
Ray On

I had the same issue. The problem is, that your config-feedforward.txt is empty, eventhough it seems filled with data in VS-Code. Try open it up manually in your folders and you will find an empty editor. Just copy paste the txt file there and the issue is gone.