Python 3.3 Bad argument type for built-in operation

Oct 8, 2012 at 11:52 AM

Hey, I have this problem in Visual Studio 2012 where some of my python 3.3 code can't run. 

If I write:

a=input()

print(a)

that's no problem, but if I write:

a=input("Give a: ")

then Visual Studio complains and say "TypeError occured, bad argument type for built-in operation". If I write the same code in "python.exe", the python interpreter, it works. I have tried with both Python 3.3 64 and 32bit. I am using PTVS 1.5 RC. Can someone help me solve this problem?

Thanks

Coordinator
Oct 8, 2012 at 4:28 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Oct 8, 2012 at 4:48 PM

(Copied from my comment on the work item.)

Okay, very easy fix here. It looks like CPython 3.3 is now requiring that the stdout.errors value is something.

You can fix it immediately by editing visualstudio_py_debugger.py - find the "errors = None" line in _DebuggerOutput (should be close to line 1760) and change it to "errors = 'strict'".