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 403: Forbidden #75

Open
ximalayashanjiao opened this issue Feb 27, 2024 · 3 comments
Open

urllib.error.HTTPError: HTTP Error 403: Forbidden #75

ximalayashanjiao opened this issue Feb 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ximalayashanjiao
Copy link

  • Qbot version: 最新版
  • Python version: conda 虚拟环境python3.9.18
  • OS (Windows, Linux, MacOS): win10
  • Commit number (optional, please provide it if you are using the dev version):

运行main.py文件后提示如下错误:
Traceback (most recent call last):
File "C:\Users\MI\Documents\BaiduSyncdisk\Qbot\auto_monitor.py", line 126, in
if check("sh", 3300, 10000) or check("601318", 0, 49):
File "C:\Users\MI\Documents\BaiduSyncdisk\Qbot\auto_monitor.py", line 108, in check
df = ts.get_realtime_quotes(code)
File "c:\Users\MI\anaconda3\envs\env_4\lib\site-packages\tushare\stock\trading.py", line 380, in get_realtime_quotes
text = urlopen(request,timeout=10).read()
File "c:\Users\MI\anaconda3\envs\env_4\lib\urllib\request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "c:\Users\MI\anaconda3\envs\env_4\lib\urllib\request.py", line 523, in open
response = meth(req, response)
File "c:\Users\MI\anaconda3\envs\env_4\lib\urllib\request.py", line 632, in http_response
response = self.parent.error(
File "c:\Users\MI\anaconda3\envs\env_4\lib\urllib\request.py", line 561, in error
return self._call_chain(*args)
File "c:\Users\MI\anaconda3\envs\env_4\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "c:\Users\MI\anaconda3\envs\env_4\lib\urllib\request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
微信图片_20240227111458

@ximalayashanjiao ximalayashanjiao added the bug Something isn't working label Feb 27, 2024
@ljhust
Copy link

ljhust commented May 6, 2024

一样的错误,无法访问tushare

@Charmve
Copy link
Member

Charmve commented Jun 14, 2024

检查下 网络是否开了vpn

@townlet
Copy link

townlet commented Jul 9, 2024

一样的错误,请问解决了吗,我电脑网络连接的是手机个人热点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants