JerBouma/FinanceDatabase

Can't import the package

medici89 opened this issue · 2 comments

Describe the bug

import FinanceDatabase as fd

Traceback (most recent call last):
File "<pyshell#5>", line 1, in
import FinanceDatabase as fd
File "C:\Python27\lib\site-packages\FinanceDatabase_init_.py", line 2, in
from .json_picker import select_cryptocurrencies
File "C:\Python27\lib\site-packages\FinanceDatabase\json_picker.py", line 41
raise ValueError(f"Not able to find any data for {cryptocurrency}.")
^
SyntaxError: invalid syntax

Using Python 2.7

Is it possible that json_picker .py has a 400 invalid URL?

def select_cryptocurrencies(cryptocurrency=None,
base_url="https://raw.githubusercontent.com/JerBouma/FinanceDatabase/master/"
"Database/Cryptocurrencies/",
use_local_location=False, all_cryptocurrencies_json="_Cryptocurrencies"):

Or is this a me issue? lol

Thanks!

Could you elaborate why you are using Python 2.7 instead of Python 3.8 or 3.7? I haven't tested the package with old versions of Python and I am pretty sure the syntax I use is added in Py3 versions. I can't seem to spot any errors within the code itself.

Got it, thanks. I'm using an old copy on a work copy that was default. Maybe its time to force their hand and update my copy.

Will try this with a new version, thanks!