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

HTTPError: HTTP Error 404: Not Found #1

Open
ctguxp opened this issue Apr 21, 2018 · 2 comments
Open

HTTPError: HTTP Error 404: Not Found #1

ctguxp opened this issue Apr 21, 2018 · 2 comments

Comments

@ctguxp
Copy link

ctguxp commented Apr 21, 2018

HTTPError Traceback (most recent call last)
in ()
9
10 from botvs import * # 引用 botvs 库
---> 11 task = VCtx(doc) # initialize backtest engine from doc # 调用 VCtx 函数 根据 __doc__初始化。
12 print(exchange.GetAccount()) # 测试 GetAccount 函数,并打印 回测系统测试交易所账户信息
13 Log("\n 调用Log")

D:\Anaconda3\lib\site-packages\botvs.py in init(self, task, autoRun, gApis, progressCallback)
972 pass
973 if update:
--> 974 open(loader, 'wb').write(httpGet("http://" + CLUSTER_IP + "/dist/depends/" + soName, CLUSTER_DOMAIN))
975 open(js, 'wb').write(httpGet("http://" + CLUSTER_IP + "/dist/depends/md5.json", CLUSTER_DOMAIN))
976 #declare

D:\Anaconda3\lib\site-packages\botvs.py in httpGet(url, customHost)
85 if customHost is not None:
86 req.add_header('Host', customHost)
---> 87 resp = urllib2.urlopen(req)
88 data = resp.read()
89 if resp.info().get('Content-Encoding') == 'gzip':

D:\Anaconda3\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
221 else:
222 opener = _opener
--> 223 return opener.open(url, data, timeout)
224
225 def install_opener(opener):

D:\Anaconda3\lib\urllib\request.py in open(self, fullurl, data, timeout)
530 for processor in self.process_response.get(protocol, []):
531 meth = getattr(processor, meth_name)
--> 532 response = meth(req, response)
533
534 return response

D:\Anaconda3\lib\urllib\request.py in http_response(self, request, response)
640 if not (200 <= code < 300):
641 response = self.parent.error(
--> 642 'http', request, response, code, msg, hdrs)
643
644 return response

D:\Anaconda3\lib\urllib\request.py in error(self, proto, *args)
568 if http_err:
569 args = (dict, 'default', 'http_error_default') + orig_args
--> 570 return self._call_chain(*args)
571
572 # XXX probably also want an abstract factory that knows when it makes

D:\Anaconda3\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
502 for handler in handlers:
503 func = getattr(handler, meth_name)
--> 504 result = func(*args)
505 if result is not None:
506 return result

D:\Anaconda3\lib\urllib\request.py in http_error_default(self, req, fp, code, msg, hdrs)
648 class HTTPDefaultErrorHandler(BaseHandler):
649 def http_error_default(self, req, fp, code, msg, hdrs):
--> 650 raise HTTPError(req.full_url, code, msg, hdrs, fp)
651
652 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 404: Not Found

@fmzquant
Copy link
Owner

fmzquant commented Apr 23, 2018

贴出你的操作系统版本.

python -c "print(__import__('platform').uname())"

@jxu86
Copy link

jxu86 commented Dec 24, 2018

我的也是这种情况
uname_result(system='Darwin', node='JCMAC', release='17.3.0', version='Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64', machine='x86_64', processor='i386')

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

3 participants