enzoampil / fastquant

fastquant — Backtest and optimize your ML trading strategies with only 3 lines of code!
MIT License
1.54k stars 239 forks source link

Still problem "cannot import name 'json_normalize' from 'pandas.io.json'" #424

Closed Enrico68 closed 1 year ago

Enrico68 commented 1 year ago

Problem description

Hello,

The problem should have been resolved, but I am still encountering an error when trying to import the package.

Example

from fastquant import get_crypto_data
# insert code here ...
File ~/Library/Python/3.9/lib/python/site-packages/fastquant/__init__.py:2
      1 # from .fastquant import *
----> 2 from .disclosures import *
      3 from .strategies import *
      4 from .network import *

File ~/Library/Python/3.9/lib/python/site-packages/fastquant/disclosures/__init__.py:4
      1 # Modules available for fastquant.disclosures.*
      3 from fastquant.disclosures.base import get_company_disclosures
----> 4 from fastquant.disclosures.pse import DisclosuresPSE
      5 from fastquant.disclosures.investagrams import DisclosuresInvestagrams
      6 from fastquant.disclosures.sentiment import get_disclosure_sentiment

File ~/Library/Python/3.9/lib/python/site-packages/fastquant/disclosures/pse.py:24
     22 from tqdm import tqdm
     23 from bs4 import BeautifulSoup
---> 24 from pandas.io.json import json_normalize
     25 import matplotlib.pyplot as pl
     26 import matplotlib as mpl

ImportError: cannot import name 'json_normalize' from 'pandas.io.json' (/Users/enricopirani/Library/Python/3.9/lib/python/site-packages/pandas/io/json/__init__.py)

Expected behavior

Environment

Enrico68 commented 1 year ago

423 .