Closed Toilal closed 9 years ago
Same problem with this code, and with any python3 version. It's working on python 2.7
>>> from babelfish.language import Language
>>> lang = Language("fra")
>>> t = type(lang)
>>> hasattr(t, 'anyattr')
Still getting what I believe is a related issue using Subliminal. Despite using the current master branch of Babelfish, if I do pickle.dumps on the output of 'subliminal.video.scan_video', when I pickle.loads the string object, I get: File "/usr/local/lib/python2.7/dist-packages/babelfish/language.py", line 139, in getattr alpha3 = self.alpha3 RuntimeError: maximum recursion depth exceeded while calling a Python object
Are you really sure this is current master of babelfish ? When i read File "/usr/local/lib/python2.7/dist-packages/babelfish/language.py"
, i'm quite sure you are using actual version from pipy (0.5.1) which is not fixed. You'll have to wait for next babelfish release.
Thanks for your comment. I installed it through the below commands - also I checked directly the local code and it does seem to have the commits fixing the issue:
sudo pip install git+https://github.com/Diaoul/babelfish.git@master Downloading/unpacking git+https://github.com/Diaoul/babelfish.git@master Cloning https://github.com/Diaoul/babelfish.git (to master) to /tmp/pip-9Yp0b9-build Running setup.py (path:/tmp/pip-9Yp0b9-build/setup.py) egg_info for package from git+https://github.com/Diaoul/babelfish.git@master
Installing collected packages: babelfish Running setup.py install for babelfish
Successfully installed babelfish Cleaning up...
I just released 0.5.2 on pypi which has the fix from Toilal. Could you check if that works for you?
Calling some inspect functions with Python 3.4 on babelfish objects crash (maximum recursion depth exceeded). see https://github.com/wackou/guessit/issues/109