Hey Guys, i have a problem with the Hangman Game from the second problem set. When I run it without changing anything it gives me this error: inFile = open(WORDLIST_FILENAME, 'r', 0) ValueError: can't have unbuffered text I/O I am using Eclipse as development environment thanks!

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions.

A community for students.

Hey Guys, i have a problem with the Hangman Game from the second problem set. When I run it without changing anything it gives me this error: inFile = open(WORDLIST_FILENAME, 'r', 0) ValueError: can't have unbuffered text I/O I am using Eclipse as development environment thanks!

MIT 6.00 Intro Computer Science (OCW)
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

Try: inFile = open(WORDLIST_FILENAME, 'r') The ", 0" isn't needed and apparently in different OS's and/or Python versions can cause problems.
Thanks for your help, I really appreciate it!! It worked, but now I get another error: wordlist = string.split(line) AttributeError: 'module' object has no attribute 'split' Could you help me again? Thanks a lot!
strings are treated as objects of type string. The method split() should be called on an instance of a string. string is a Python module. The code should be something like: >>> foo = "Hello World" >>> foo.split( ' ' ) ['Hello', 'World'] >>> The split() method takes a string to use to split the parent string on ( in this case, space ).

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

I am using Python 3.5 and work in LiClipse. Apparently, there were some changes specific either to OS or to Python version which require small changes in syntax. So in your case try wordlist = str.split(line). Should work.

Not the answer you are looking for?

Search for more explanations.

Ask your own question