alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 374 forks source link

Data retrieval error while retriving index information #509

Closed Santunav closed 2 years ago

Santunav commented 2 years ago

investpy.indices.get_index_information(index='Nifty IT', country='india', as_json=False)

RuntimeError Traceback (most recent call last) /tmp/ipykernel_7399/1989462206.py in ----> 1 investpy.indices.get_index_information(index='Nifty IT', country='india', as_json=False)

~/.local/lib/python3.8/site-packages/investpy/indices.py in get_index_information(index, country, as_json) 762 return result 763 else: --> 764 raise RuntimeError("ERR#0004: data retrieval error while scraping.") 765 766

RuntimeError: ERR#0004: data retrieval error while scraping.

alvarobartt commented 2 years ago

Hi @Santunav, I've just tested it and it seems to be working fine on my side... :weary: Let me check if I can reproduce the issue somehow...

image

alvarobartt commented 2 years ago

@Santunav can you please make sure that you're using the latest investpy version (actually v1.0.7)?

alvarobartt commented 2 years ago

Just to let you know, the bug that you're reporting was already reported at https://github.com/alvarobartt/investpy/pull/454, and fixed at https://github.com/alvarobartt/investpy/commit/b28401226dabab91cf2227d84620341c0d307410

alvarobartt commented 2 years ago

Ok, it was fixed at some point but not released yet, so I'll just release investpy v1.0.8 including some bug fixes so that you can use that function as expected! Sorry for the inconvenience :smile:

alvarobartt commented 2 years ago

Please try to install the latest version as detailed in https://github.com/alvarobartt/investpy/releases/tag/1.0.8 so as to check whether the bug you mentioned here is already solved or not! 👍🏻 Thanks!

typhoon71 commented 2 years ago

Not the OP, but I tested it anyway:

test

Seems OK to me.

alvarobartt commented 2 years ago

Thanks a lot @typhoon71 :hugs:

Santunav commented 2 years ago

Thank you for your response and quick fix.😀

On Tue, Jan 25, 2022 at 2:59 PM Álvaro Bartolomé @.***> wrote:

Thanks a lot @typhoon71 https://github.com/typhoon71 🤗

— Reply to this email directly, view it on GitHub https://github.com/alvarobartt/investpy/issues/509#issuecomment-1020981775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXLQMAUML43LUDVR45PEYULUXZUQBANCNFSM5MTLSHQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Santunav commented 2 years ago

I'm looking for one more data in this is API

  | Index Name | Prev. Close | Volume | Day's Range | Open | Average Vol. (3m) | 52 wk Range | 1-Year Change

In this API, i'm looking for today's close price. Which is very important to draw candle stick. Any upgrade possible.