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

Invalid date #9

Open
timojuez opened this issue May 18, 2022 · 0 comments
Open

Invalid date #9

timojuez opened this issue May 18, 2022 · 0 comments

Comments

@timojuez
Copy link

Date cannot be handled in data.py:get_historical_share_prices sometimes. The dates can be handled well if they are in the format YYYY-MM-DD, but sometimes the API gives us YYYY-MM and this causes an exception. I changed the file to give more output:

Error parsing '2016-12' to date.
Traceback (most recent call last):
  File "/home/timo/DCF/modeling/data.py", line 152, in get_historical_share_prices
    try: date_start, date_end = date[0:8] + str(int(date[8:]) - 2), date
ValueError: invalid literal for int() with base 10: ''

I have committed a change that surround it by try and except: continue so that it does display the plot but some values are missing. Parsing has to be implemented.

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

1 participant