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

Python 3? #49

Open
dstromberg opened this issue May 29, 2019 · 3 comments
Open

Python 3? #49

dstromberg opened this issue May 29, 2019 · 3 comments

Comments

@dstromberg
Copy link

Hi.

What's the story with flatten_json on Python 3.x? You probably already know that Python 2.x will not be supported much longer. I'm asking mostly because caniusepython3 identified flatten_json as one of the projects that need to be looked at.

If the compatibility is currently unknown, is there a test suite I can run with a Python 3.x interpreter to see how things look?

Thanks!

@cugu
Copy link

cugu commented Jun 5, 2019

I'm using this in python3 without any issues.

@jtlz2
Copy link

jtlz2 commented Oct 28, 2021

@dstromberg @cugu I do have issues when calling flatten in python3:

    flattened = flatten(nested_dict)
  File "env/lib/python3.7/site-packages/flatten_json/__init__.py", line 118, in flatten
    _flatten(nested_dict, None)
  File "env/lib/python3.7/site-packages/flatten_json/__init__.py", line 104, in _flatten
    replace_separators=replace_separators))
  File "env/lib/python3.7/site-packages/flatten_json/__init__.py", line 92, in _flatten
    if not object_:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

@jtlz2
Copy link

jtlz2 commented Oct 28, 2021

Apols - see my earlier Q at #56

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

3 participants