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

Error by: core_selection = fd.select_etfs("core_selection_degiro_filtered") #9

Closed
thomas2004ch opened this issue Jun 11, 2021 · 6 comments

Comments

@thomas2004ch
Copy link

Hi,

As I run the code:
...
core_selection = fd.select_etfs("core_selection_degiro_filtered")
...
I got error as follow:
`JSONDecodeError Traceback (most recent call last)
~\anaconda3\lib\site-packages\FinanceDatabase\json_picker.py in select_etfs(category)
105 request = requests.get(json_file)
--> 106 json_data = json.loads(request.text)
107 except json.decoder.JSONDecodeError:

~\anaconda3\lib\json_init_.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
347 parse_constant is None and object_pairs_hook is None and not kw):
--> 348 return _default_decoder.decode(s)
349 if cls is None:

~\anaconda3\lib\json\decoder.py in decode(self, s, _w)
339 if end != len(s):
--> 340 raise JSONDecodeError("Extra data", s, end)
341 return obj

JSONDecodeError: Extra data: line 1 column 4 (char 3)

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
in
----> 1 core_selection = fd.select_etfs("core_selection_degiro_filtered")
2 # core_selection = fd.select_etfs("")
3 # core_selection

~\anaconda3\lib\site-packages\FinanceDatabase\json_picker.py in select_etfs(category)
106 json_data = json.loads(request.text)
107 except json.decoder.JSONDecodeError:
--> 108 raise ValueError(f"Not able to find any data for {category}.")
109 else:
110 try:

ValueError: Not able to find any data for core_selection_degiro_filtered.`

@JerBouma
Copy link
Owner

Hi Thomas,

Great catch. This doesn't match anymore with the naming in the Database. See here. Thus it should be: core_selection = fd.select_etfs("core_selection_filtered")

Will adjust in README.md now.

@thomas2004ch
Copy link
Author

thomas2004ch commented Jun 12, 2021 via email

@thomas2004ch
Copy link
Author

Finance Database.txt

Since here doesn't support upload notebook file. I change the supress to .txt. Please download it and change it to .ipynb

@thomas2004ch
Copy link
Author

sorry, change the file type back to .ipynb.

@JerBouma
Copy link
Owner

image

Exactly same result. Sorry man, it really is on your side. I can't do much more troubleshooting than this.

@thomas2004ch
Copy link
Author

thomas2004ch commented Jun 14, 2021 via email

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

2 participants