a-PyTorch-Tutorial-to-Image-Captioning icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard

OSError: Unable to create link (name already exists)

Open zxh19976666 opened this issue 3 years ago • 5 comments

when i run create_input_files.py it show me this:

$ python create_input_files.py Traceback (most recent call last): File "create_input_files.py", line 11, in max_len=50) File "/home/qq/zxh/re-code/Apytorch/utils.py", line 97, in create_input_files images = h.create_dataset('images', (len(impaths), 3, 256, 256), dtype='uint8') File "/home/qq/anaconda3/envs/z/lib/python3.6/site-packages/h5py/_hl/group.py", line 139, in create_dataset self[name] = dset File "/home/qq/anaconda3/envs/z/lib/python3.6/site-packages/h5py/_hl/group.py", line 373, in setitem h5o.link(obj.id, self.id, name, lcpl=lcpl, lapl=self._lapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5o.pyx", line 202, in h5py.h5o.link OSError: Unable to create link (name already exists

how to solve this problem?

zxh19976666 avatar Mar 01 '22 08:03 zxh19976666

Hi, do you already have existing TRAIN HDF5 files in this directory? If yes, make sure to erase them every time before creating new files.

aliciaviernes avatar Mar 01 '22 08:03 aliciaviernes

Hi, do you already have existing TRAIN HDF5 files in this directory? If yes, make sure to erase them every time before creating new files.

OK,now this is a new problem...

python create_input_files.py

Reading TRAIN images and captions, storing to file...

0%| | 0/6000 [00:00<?, ?it/s] Traceback (most recent call last): File "create_input_files.py", line 11, in max_len=50) File "/home/qq/zxh/re-code/Apytorch/utils.py", line 116, in create_input_files img = imread(impaths[i]) File "/home/qq/anaconda3/envs/z/lib/python3.6/site-packages/imageio/core/functions.py", line 264, in imread reader = read(uri, format, "i", **kwargs) File "/home/qq/anaconda3/envs/z/lib/python3.6/site-packages/imageio/core/functions.py", line 173, in get_reader request = Request(uri, "r" + mode, **kwargs) File "/home/qq/anaconda3/envs/z/lib/python3.6/site-packages/imageio/core/request.py", line 126, in init self._parse_uri(uri) File "/home/qq/anaconda3/envs/z/lib/python3.6/site-packages/imageio/core/request.py", line 278, in _parse_uri raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: '/home/qq/zxh/re-code/Apytorch/image/Flickr8k/Flickr8k_Dataset/2513260012_03d33305cf.jpg'

zxh19976666 avatar Mar 01 '22 08:03 zxh19976666

Hi, do you already have existing TRAIN HDF5 files in this directory? If yes, make sure to erase them every time before creating new files.

But I have this file in my dataset. I'm a rookie. Please help me

zxh19976666 avatar Mar 01 '22 08:03 zxh19976666

Hi @zxh19976666 do you have the solution? I have same problem

supriamir avatar Sep 15 '22 03:09 supriamir

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

zxh19976666 avatar Sep 15 '22 03:09 zxh19976666