sgrvinod / a-PyTorch-Tutorial-to-Image-Captioning

Show, Attend, and Tell | a PyTorch Tutorial to Image Captioning
MIT License
2.75k stars 711 forks source link

OSError: Unable to create link (name already exists) #166

Open zxh19976666 opened 2 years ago

zxh19976666 commented 2 years ago

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?

aliciaviernes commented 2 years ago

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.

zxh19976666 commented 2 years ago

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 commented 2 years ago

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

supriamir commented 2 years ago

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

zxh19976666 commented 2 years ago

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