ZilantRobotics / innopolis_vtol_dynamics

Cyphal/DroneCAN UAV HITL simulator
GNU General Public License v3.0
41 stars 8 forks source link

./scripts/sim.py report error because logs directory not exists #62

Closed frontw closed 3 months ago

frontw commented 4 months ago

./scripts/sim.py needs logs directory to exist. Error gone after creating directory, but better to check it in code

roman@RG5:~/Projects/UAVCAN/innopolis_vtol_dynamics$ ./scripts/sim.py 
Traceback (most recent call last):
  File "./scripts/sim.py", line 164, in <module>
    main()
  File "./scripts/sim.py", line 110, in main
    logging.basicConfig(level=logging.DEBUG,
  File "/usr/lib/python3.8/logging/__init__.py", line 1988, in basicConfig
    h = FileHandler(filename, mode)
  File "/usr/lib/python3.8/logging/__init__.py", line 1147, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.8/logging/__init__.py", line 1176, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/home/roman/Projects/UAVCAN/innopolis_vtol_dynamics/logs/log_2024-07-08_15-01-56.log'
PonomarevDA commented 3 months ago

fixed https://github.com/ZilantRobotics/innopolis_vtol_dynamics/pull/63