julimueller / dtld_parsing

Scripts for loading and visualizing the DriveU Traffic Light Dataset (DTLD)
57 stars 12 forks source link

Error with pyyaml 6.0 #15

Open sgabor1 opened 2 years ago

sgabor1 commented 2 years ago

python3 load_dtld.py --label_file /DriveU/dtld_data/v2.0/DTLD_all.json --calib_dir /DriveU/dtld_parsing/calibration --data_base_dir /DriveU/dtld_data

2021-12-19 17:23:08.352 INFO driveu_dataset - open: Opening DriveuDatabase from file: /DriveU/dtld_data/v2.0/DTLD_all.json Traceback (most recent call last): File "load_dtld.py", line 119, in <module> main(parse_args()) File "load_dtld.py", line 61, in main intrinsic_left = calibration.load_intrinsic_matrix( File "/DriveU/dtld_parsing/python/dtld_parsing/calibration.py", line 262, in load_intrinsic_matrix matrix = self.load_calibration_matrix(path) File "/DriveU/dtld_parsing/python/dtld_parsing/calibration.py", line 249, in load_calibration_matrix data = yaml.load(infile) TypeError: load() missing 1 required positional argument: 'Loader'

sgabor1 commented 2 years ago

Changing pyyaml to pyyaml==5.4.1 in requirements.txt solved the issue

TheLorenzor commented 1 year ago

ALso possible is to go to _./python/dtldparsing/calibration.py and change line 249 from

data= yaml.load(infile) to data = yaml.safe_load(infile)

does the trick and works perfectly