Skip to content

[BUG] pypi.org hosted fastquant 0.1.8.1 breaks due to json_normalize (fix already in master) #423

@icasimpan

Description

@icasimpan

Problem description

More of an issue with the version in pypi.org than a current bug, already fixed in commit df6d605

Example

from fastquant import get_pse_data, backtest
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/icasimpan/code/isolate/env/lib/python3.11/site-packages/fastquant/__init__.py", line 2, in <module>
    from .disclosures import *
  File "/home/icasimpan/code/isolate/env/lib/python3.11/site-packages/fastquant/disclosures/__init__.py", line 4, in <module>
    from fastquant.disclosures.pse import DisclosuresPSE
  File "/home/icasimpan/code/isolate/env/lib/python3.11/site-packages/fastquant/disclosures/pse.py", line 24, in <module>
    from pandas.io.json import json_normalize
ImportError: cannot import name 'json_normalize' from 'pandas.io.json' (/home/icasimpan/code/isolate/env/lib/python3.11/site-packages/pandas/io/json/__init__.py)

Expected behavior

It's not supposed to break. Fixed the issue same as what was done in df6d605 and the module worked fine.

Workaround

Simply install using the master branch instead of using pypi version:

git clone [email protected]:enzoampil/fastquant.git
python -m pip install -e ./fastquant

Environment

  • platform (e.g. Linux):
  • fastquant version (e.g. 0.1.8.1)
  • installation method: pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions