AC-VRNN icon indicating copy to clipboard operation
AC-VRNN copied to clipboard

IsADirectoryError: [Errno 21] Is a directory when running heatmap.py

Open lylyjy opened this issue 4 years ago • 4 comments

I use eth data, and when I run heatmap.py, it occurs that:

Traceback (most recent call last): File "/mnt/e/AC-VRNN-master/dataset_processing/heatmap.py", line 286, in compute_mean_displacement_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets/eth', delim='\t') File "/mnt/e/AC-VRNN-master/dataset_processing/heatmap.py", line 88, in compute_mean_displacement_eth_ucy data = read_file(path, delim) File "./dataset_processing/dataloader_utils.py", line 34, in read_file with open(_path, 'r') as f: IsADirectoryError: [Errno 21] Is a directory: '/mnt/e/AC-VRNN-master/datasets/eth/test'

My definition is : if name == 'main': compute_mean_displacement_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets/eth', delim='\t') compute_local_heatmaps_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets/eth', out_dir='local_hm_5x5', delim='\t')

Thanks.

lylyjy avatar Feb 16 '21 07:02 lylyjy

Are you using the dataset version provided here https://github.com/huang-xx/STGAT/tree/master/STGAT/datasets? Moreover, you have to pass the path to the global directory containing all ETH/UCY datasets. compute_mean_displacement_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets', delim='\t') compute_local_heatmaps_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets', out_dir='local_hm_5x5', delim='\t')

alessiabertugli avatar Feb 24 '21 07:02 alessiabertugli

Are you using the dataset version provided here https://github.com/huang-xx/STGAT/tree/master/STGAT/datasets? Moreover, you have to pass the path to the global directory containing all ETH/UCY datasets. compute_mean_displacement_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets', delim='\t') compute_local_heatmaps_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets', out_dir='local_hm_5x5', delim='\t')

There is still a problem. In dataloader_utils.py, the function of read_file is the main reason. Especially with open(_path, 'r') as f: it also occurs that: Exception has occurred: IsADirectoryError [Errno 21] Is a directory: '/mnt/e/AC-VRNN-master/datasets/eth' File "/mnt/e/AC-VRNN-master/dataset_processing/dataloader_utils.py", line 34, in read_file with open(_path, 'r') as f: File "/mnt/e/AC-VRNN-master/dataset_processing/heatmap.py", line 90, in compute_mean_displacement_eth_ucy data = read_file(path, delim) File "/mnt/e/AC-VRNN-master/dataset_processing/heatmap.py", line 288, in compute_mean_displacement_eth_ucy(data_dir='/mnt/e/AC-VRNN-master/datasets', delim='tab')

Is it OK in your conmuter? Thanks.

lylyjy avatar Feb 24 '21 12:02 lylyjy

And how to generate npy document?Thanks.

lylyjy avatar Feb 24 '21 13:02 lylyjy

I have the same issue. Were you able to fix it?

godspeed5 avatar Aug 25 '21 13:08 godspeed5