How can I fix this “ValueError: can’t have unbuffered text I/O” in python 3?

From open‘s docstring:

… buffering is an optional integer used to set the buffering policy.
Pass 0 to switch buffering off (only allowed in binary mode) …

So change inFile = open(WORDLIST_FILENAME, 'r', 0)

to

inFile = open(WORDLIST_FILENAME, 'r'), or to

inFile = open(WORDLIST_FILENAME, 'rb', 0) if you really need it (which I doubt).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)