sushant10 / HQ_Bot

📲 Bot to help solve HQ trivia
MIT License
173 stars 92 forks source link

NameError: name 'buffer' is not defined #160

Closed Element21 closed 2 years ago

Element21 commented 5 years ago

I have python 3.6 and all the required packages installed but whenever I press "s" it gives me this error message.

buffer error

garchaaman19 commented 5 years ago

How did you resolve this, I am getting the same error, Please help me if you can.

Element21 commented 5 years ago

The pyscreenshot screenshot function only works on Mac and windows. To solve I think I just changed "buffer" with "to_bytes" in /usr/local/lib/python3.6/dist-packages/pyscreenshot/wxscreen.py. You also have to add "to_bytes = bytes if PY3 else buffer" to the beginning of that same file. If this doesn't work feel free to respond! 👍

Element21 commented 5 years ago

Also, if you want a good bot just use https://hquties.win. This bot does not work very well.