Open niu1970 opened 4 years ago
Then I downloaded and installed it offline:
The same error occurs when you run the Python-M Spacy Download en statement!
Just in case you haven't solved the error, try this pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz and then this python -m spacy download en
python -m spacy download en
This still doesn't fix the problem for me.
Error: (1)D:\Anaconda2\envs\py36\python.exe D:/PythonCode1/densecap-master/test.py --cfgs_file cfgs/anet.yml --densecap_eval_file ./tools/densevid_eval/evaluate.py --batch_size 1 --start_from ./checkpoint/anet-2L-e2e-mask/model_epoch_19.t7 --id anet-2L-e2e-mask-19 --val_data_folder validation --learn_mask --gated_mask --cuda D:/PythonCode1/densecap-master/test.py:82: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. options_yaml = yaml.load(handle) Namespace(attn_dropout=0.2, batch_size=1, cap_dropout=0.2, cfgs_file='cfgs/anet.yml', cuda=True, d_hidden=2048, d_model=1024, dataset='anet', dataset_file='./data/anet/anet_annotations_trainval.json', densecap_eval_file='./tools/densevid_eval/evaluate.py', densecap_references=['./data/anet/val_1.json', './data/anet/val_2.json'], dur_file='./data/anet/anet_duration_frame.csv', feature_root='/z/home/luozhou/dataset/anet/ActivityNet', gated_mask=True, id='anet-2L-e2e-mask-19', image_feat_size=3072, in_emb_dropout=0.1, kernel_list=[1, 2, 3, 4, 5, 7, 9, 11, 15, 21, 29, 41, 57, 71, 111, 161, 211, 251], learn_mask=True, max_prop_num=500, max_sentence_len=20, min_prop_before_nms=200, min_prop_num=50, n_heads=8, n_layers=2, num_workers=2, pos_thresh=0.7, sampling_sec=0.5, slide_window_size=480, slide_window_stride=20, start_from='./checkpoint/anet-2L-e2e-mask/model_epoch_19.t7', stride_factor=50, val_data_folder='validation', vis_emb_dropout=0.1) loading dataset Traceback (most recent call last): File "D:/PythonCode1/densecap-master/test.py", line 255, in
main()
File "D:/PythonCode1/densecap-master/test.py", line 244, in main
test_loader, text_proc = get_dataset(args)
File "D:/PythonCode1/densecap-master/test.py", line 94, in get_dataset
text_proc, raw_data = get_vocab_and_sentences(args.dataset_file, args.max_sentence_len)
File "D:\PythonCode1\densecap-master\data\anet_dataset.py", line 29, in get_vocab_and_sentences
fix_length=max_length)
File "D:\Anaconda2\envs\py36\lib\site-packages\torchtext\data\field.py", line 163, in init
self.tokenize = get_tokenizer(tokenize, tokenizer_language)
File "D:\Anaconda2\envs\py36\lib\site-packages\torchtext\data\utils.py", line 114, in get_tokenizer
spacy = spacy.load(language)
File "D:\Anaconda2\envs\py36\lib\site-packages\spacy__init__.py", line 30, in load
return util.load_model(name, **overrides)
File "D:\Anaconda2\envs\py36\lib\site-packages\spacy\util.py", line 169, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Process finished with exit code 1
(2)**(py36) C:\Users\renfang>python -m spacy download en Traceback (most recent call last): File "D:\Anaconda2\envs\py36\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen self._prepare_proxy(conn) File "D:\Anaconda2\envs\py36\lib\site-packages\urllib3\connectionpool.py", line 930, in _prepare_proxy conn.connect() File "D:\Anaconda2\envs\py36\lib\site-packages\urllib3\connection.py", line 316, in connect self._tunnel() File "D:\Anaconda2\envs\py36\lib\http\client.py", line 924, in _tunnel (version, code, message) = response._read_status() File "D:\Anaconda2\envs\py36\lib\http\client.py", line 276, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Anaconda2\envs\py36\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "D:\Anaconda2\envs\py36\lib\site-packages\urllib3\connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "D:\Anaconda2\envs\py36\lib\site-packages\urllib3\util\retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/shortcuts-v2.json (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Anaconda2\envs\py36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "D:\Anaconda2\envs\py36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Anaconda2\envs\py36\lib\site-packages\spacy__main__.py", line 33, in
plac.call(commands[command], sys.argv[1:])
File "D:\Anaconda2\envs\py36\lib\site-packages\plac_core.py", line 367, in call
cmd, result = parser.consume(arglist)
File "D:\Anaconda2\envs\py36\lib\site-packages\plac_core.py", line 232, in consume
return cmd, self.func(*(args + varargs + extraopts), kwargs)
File "D:\Anaconda2\envs\py36\lib\site-packages\spacy\cli\download.py", line 44, in download
shortcuts = get_json(about.shortcuts, "available shortcuts")
File "D:\Anaconda2\envs\py36\lib\site-packages\spacy\cli\download.py", line 95, in get_json
r = requests.get(url)
File "D:\Anaconda2\envs\py36\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, kwargs)
File "D:\Anaconda2\envs\py36\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, kwargs)
File "D:\Anaconda2\envs\py36\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "D:\Anaconda2\envs\py36\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "D:\Anaconda2\envs\py36\lib\site-packages\requests\adapters.py", line 510, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/shortcuts-v2.json (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))
(3)By the way, does win10+python3.6+cuda9.0+pytorch1.1.0 work?
Looking forward to your reply!