danielnyga / pracmln

Markov Logic Networks in Python
http://www.pracmln.org
BSD 2-Clause "Simplified" License
134 stars 46 forks source link

stdout object does not have a buffer attribute. #4

Closed MdAsifKhan closed 6 years ago

MdAsifKhan commented 6 years ago

Hey, I get following error when running pracmln from jupyter notebook. AttributeError: 'OutStream' object has no attribute 'buffer' It seems stdout object does not have a buffer attribute.

MdAsifKhan commented 6 years ago

I think it is because of python environment. It seems jupyter notebook behaves more like python 2. To fix it I did following changes in wcsp.py: line 133 & 228: sys.stdout.buffer --> getattr(sys.stdout,'buffer',sys.stderr) It works now.