Open moonseyes opened 1 year ago
Mình chạy phần này trong file test.py
import vnquant.data as dt loader = dt.FinanceLoader('VND', '2019-06-02','2021-12-31', data_source='VND', minimal=True) data_business = loader.get_business_report() print(data_business.head()) data_business.head().to_html('data_business.html')
import vnquant.data as dt
loader = dt.FinanceLoader('VND', '2019-06-02','2021-12-31', data_source='VND', minimal=True)
data_business = loader.get_business_report()
print(data_business.head())
data_business.head().to_html('data_business.html')
thì gặp lỗi:
Traceback (most recent call last): File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/site-packages/requests/models.py", line 960, in json return complexjson.loads(self.content.decode(encoding), **kwargs) File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 10, in data_business = loader.get_business_report() File "/mnt/e/Finance_noobies/vnquant/vnquant/data/finance.py", line 59, in get_business_report data = page.json() File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/site-packages/requests/models.py", line 968, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last): File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/site-packages/requests/models.py", line 960, in json return complexjson.loads(self.content.decode(encoding), **kwargs) File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "test.py", line 10, in data_business = loader.get_business_report() File "/mnt/e/Finance_noobies/vnquant/vnquant/data/finance.py", line 59, in get_business_report data = page.json() File "/home/tananh/miniconda3/envs/vnquant2/lib/python3.8/site-packages/requests/models.py", line 968, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Lỗi này gặp phải với get_business_report(), get_finan_report(), và get_cashflow_report(). Bạn có thể xem qua phần này được không?
Same prolem, có vẻ như địa chỉ get json sai rồi anh ạ, có thể bên cung cấp đã đổi
Mình chạy phần này trong file test.py
import vnquant.data as dt
loader = dt.FinanceLoader('VND', '2019-06-02','2021-12-31', data_source='VND', minimal=True)
data_business = loader.get_business_report()
print(data_business.head())
data_business.head().to_html('data_business.html')
thì gặp lỗi:
Lỗi này gặp phải với get_business_report(), get_finan_report(), và get_cashflow_report(). Bạn có thể xem qua phần này được không?