python-flattery icon indicating copy to clipboard operation
python-flattery copied to clipboard

python 3

Open benman1 opened this issue 9 years ago • 1 comments

Incompatible with python 3?

I get an import error in python 3.4.

ImportErrorTraceback (most recent call last)
<ipython-input-103-3a41ffc8a047> in <module>()
----> 1 from flattery import flatten, unflatten
      2 
      3 unflatten(df.to_dict(orient='record')[0])

/usr/local/lib/python3.4/dist-packages/flattery/__init__.py in <module>()
      1 #!/usr/bin/env python
      2 
----> 3 from flattery.cext import *
      4 

ImportError: /usr/local/lib/python3.4/dist-packages/flattery/cext.cpython-34m.so: undefined symbol: PyString_FromStringAndSize

Searching for a fix, I found this link: https://groups.google.com/forum/#!topic/cython-users/xoKNFTRagvk where it is suggested to use PyBytes_FromStringAndSize(NULL, length)

benman1 avatar Aug 01 '16 15:08 benman1

Seems this repository is not active. Have you found any alternatives for flattery?