Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib.error.HTTPError: HTTP Error 404: Not Found #216

Open
Innan666 opened this issue Jul 18, 2019 · 7 comments
Open

urllib.error.HTTPError: HTTP Error 404: Not Found #216

Innan666 opened this issue Jul 18, 2019 · 7 comments

Comments

@Innan666
Copy link

(measure) C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src>python demo.py ctdet --demo webcam --load_model ../models/ctdet_coco_dla_2x.pth
Fix size testing.
training chunk_sizes: [32]
The output will be saved to C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib....\exp\ctdet\default
heads {'hm': 80, 'wh': 2, 'reg': 2}
Creating model...
Downloading: "http://dl.yf.io/dla/models\imagenet\dla34-ba72cf86.pth" to C:\Users\IFL/.cache\torch\checkpoints\dla34-ba72cf86.pth
Traceback (most recent call last):
File "demo.py", line 56, in
demo(opt)
File "demo.py", line 21, in demo
detector = Detector(opt)
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\detectors\ctdet.py", line 22, in init
super(CtdetDetector, self).init(opt)
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\detectors\base_detector.py", line 24, in init
self.model = create_model(opt.arch, opt.heads, opt.head_conv)
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\models\model.py", line 28, in create_model
model = get_model(num_layers=num_layers, heads=heads, head_conv=head_conv)
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\models\networks\pose_dla_dcn.py", line 491, in get_pose_net
head_conv=head_conv)
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\models\networks\pose_dla_dcn.py", line 434, in init
self.base = globals()base_name
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\models\networks\pose_dla_dcn.py", line 314, in dla34
model.load_pretrained_model(data='imagenet', name='dla34', hash='ba72cf86')
File "C:\Users\IFL\Desktop\Liu\Detector\CenterNet\src\lib\models\networks\pose_dla_dcn.py", line 300, in load_pretrained_model
model_weights = model_zoo.load_url(model_url)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\site-packages\torch\hub.py", line 433, in load_state_dict_from_url
_download_url_to_file(url, cached_file, hash_prefix, progress=progress)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\site-packages\torch\hub.py", line 349, in _download_url_to_file
u = urlopen(url)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Users\IFL\Anaconda3\envs\measure\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Can you tell me how can i fix it?

@VRCMF
Copy link

VRCMF commented Jul 19, 2019

directly download the file from url save it to the target folder @Innan666

@haryngod
Copy link

haryngod commented Sep 24, 2019

I got the same issue. I tried to get http://dl.yf.io/dla/models\imagenet\dla34-ba72cf86.pth but I got 404 error also. How can we fix it?

@haryngod
Copy link

I got the same issue. I tried to get but I got 404 error also. How can we fix it?

I got it. Get into http://dl.yf.io/dla/models/imagenet and download dla34-ba72cf86.pth directly.

@seungtaek94
Copy link

seungtaek94 commented Nov 25, 2020

@Innan666 , @haryngod

in windows system has problem at that parts. so u should change that cord or download directly.

u can change that part like below;

url = 'http://dl.yf.io/dla/models/' + data + '/{}-{}.pth'.format(name, hash)
return url

@howdidthatwork
Copy link

I got the same issue. I tried to get but I got 404 error also. How can we fix it?

I got it. Get into http://dl.yf.io/dla/models/imagenet and download dla34-ba72cf86.pth directly.

Where do I put it when I download it

@howdidthatwork
Copy link

@Innan666 , @haryngod

in windows system has problem at that parts. so u should change that cord or download directly.

u can change that part like below;

url = 'http://dl.yf.io/dla/models/' + data + '/{}-{}.pth'.format(name, hash)
return url

Thank you for your help, where do I put it when I download directly

@FabriceNdayi
Copy link

@howdidthatwork

I fixed the problem by downloading the pre-trained model on the link given by @haryngod then paste the pre-trained model in the checkpoint folder
model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants