ROSMonitoring icon indicating copy to clipboard operation
ROSMonitoring copied to clipboard

IOError in generator.py", line 28, in create_monitor

Open mluckcuck opened this issue 6 years ago • 1 comments

Running matt@Vesta:~/Work/ROSMonitoring/generator$ ./generator --config_file offline_config.yaml throws an error, because the monitor it's trying to open doesn't yet exist (for me).

matt@Vesta:~/Work/ROSMonitoring/generator$ ./generator --config_file offline_config.yaml 
Traceback (most recent call last):
  File "./generator", line 115, in <module>
    main(sys.argv)
  File "./generator", line 108, in main
    create_monitor(monitor['monitor']['id'], monitor['monitor']['topics'], monitor['monitor']['log'], url, port, oracle_action, silent)
  File "/home/matt/Work/ROSMonitoring/generator/generator.py", line 28, in create_monitor
    with open('../monitor/src/' + monitor_id + '.py', 'w') as monitor: # the monitor code will be in monitor.py
IOError: [Errno 2] No such file or directory: '../monitor/src/monitor0.py'

seems that this is fixed if I create the directory monitor/src manually.

mluckcuck avatar Feb 03 '20 15:02 mluckcuck

Git was ignoring the src folder because it was empty. I added the .gitkeep file to force Git to load the src folder. Thanks!

AngeloFerrando avatar Feb 03 '20 15:02 AngeloFerrando