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

currency_hist报错 #2822

Closed
csfreebird opened this issue Aug 7, 2022 · 7 comments
Closed

currency_hist报错 #2822

csfreebird opened this issue Aug 7, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@csfreebird
Copy link

遇到任何问题,请先确认您的 AKShare 版本是最新的

pip install akshare --upgrade  # Python 版本需要大于 3.7

描述遇到的问题

  1. 操作系统版本: ubuntu 20.04
  2. Python 版本: 3.8.10
  3. AKShare 版本: 最新版本,测试前刚刚升级过akshare
  4. 接口的名称和代码: currency_hist
  5. 接口报错的截图或代码
>>> import akshare as ak
>>> currency_hist_df = ak.currency_hist(symbol="usd-jpy", start_date="20050101", end_date="20200117")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dean/work/pyenv/quantopianPython/lib/python3.8/site-packages/akshare/fx/currency_investing.py", line 57, in currency_hist
    title = soup.find("h2", attrs={"class": "float_lang_base_1"}).get_text()
AttributeError: 'NoneType' object has no attribute 'get_text'
  1. 期望获得的正确结果
    之前工作正常,最近两天突然报错。
@csfreebird csfreebird added the bug Something isn't working label Aug 7, 2022
@newtomblue
Copy link

對~我也有相同問題 AttributeError: 'NoneType' object has no attribute 'get_text'

@albertandking
Copy link
Collaborator

對~我也有相同問題 AttributeError: 'NoneType' object has no attribute 'get_text'

目标网页接口调整了

@newtomblue
Copy link

那該怎麼修改呢 我一直找方法

@albertandking
Copy link
Collaborator

遇到任何问题,请先确认您的 AKShare 版本是最新的

pip install akshare --upgrade  # Python 版本需要大于 3.7

描述遇到的问题

  1. 操作系统版本: ubuntu 20.04
  2. Python 版本: 3.8.10
  3. AKShare 版本: 最新版本,测试前刚刚升级过akshare
  4. 接口的名称和代码: currency_hist
  5. 接口报错的截图或代码
>>> import akshare as ak
>>> currency_hist_df = ak.currency_hist(symbol="usd-jpy", start_date="20050101", end_date="20200117")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dean/work/pyenv/quantopianPython/lib/python3.8/site-packages/akshare/fx/currency_investing.py", line 57, in currency_hist
    title = soup.find("h2", attrs={"class": "float_lang_base_1"}).get_text()
AttributeError: 'NoneType' object has no attribute 'get_text'
  1. 期望获得的正确结果
    之前工作正常,最近两天突然报错。

感谢反馈问题;已修复该问题,升级到 AKShare 1.6.81 版本使用

@albertandking
Copy link
Collaborator

那該怎麼修改呢 我一直找方法

感谢反馈问题;已修复该问题,升级到 AKShare 1.6.81 版本使用

@albertandking
Copy link
Collaborator

感谢反馈问题;已修复该问题,升级到 AKShare 1.6.81 版本使用

@newtomblue
Copy link

對~我也有相同問題 AttributeError: 'NoneType' object has no attribute 'get_text'

目标网页接口调整了

非常感謝 小伙伴的幫忙~~~

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

3 participants