New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magic %paste not working in Python 3.3.2. TypeError: Type str doesn't support the buffer API #3386
Comments
It looks like this was fixed in the big pull request #1715, which wasn't backported to the 0.13 series. And I guess it's presumably OS X specific - we'd probably have noticed it on Windows. In principle this is a candidate for backporting a fix, but I don't think we're planning another 0.13 release. |
There (almost certainly) won't be another 0.13 release. Closing as fixed in 1.0. |
Reopening as it turns out that it is an issue on Windows after all, if you have the pywin32 module installed. |
In [1]: %pasteTypeError Traceback (most recent call last) c:\python33\lib\site-packages\IPython\core\interactiveshell.py in magic(self, arg_s) c:\python33\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line) c:\python33\lib\site-packages\IPython\terminal\interactiveshell.py in paste(self, parameter_s) c:\python33\lib\site-packages\IPython\core\magic.py in (f, _a, *_k) c:\python33\lib\site-packages\IPython\terminal\interactiveshell.py in paste(self, parameter_s) c:\python33\lib\site-packages\IPython\core\interactiveshell.py in (src) c:\python33\lib\site-packages\IPython\utils\PyColorize.py in format(self, raw, out, scheme) c:\python33\lib\site-packages\IPython\utils\PyColorize.py in format2(self, raw, out, scheme) TypeError: Type str doesn't support the buffer API In [2]: |
Ensure that we get unicode from the clipboard when using pywin32. Closes ipythongh-3386 Also catches the empty clipboard case and displays a short error message, instead of a huge traceback.
@breamoreboy : can you check that PR #4460 fixes it for you? Thanks. |
I've tried it with a simple one liner, a pile of import statements and then a function definition and all worked fine. Thank you everybody :) |
Ensure that we get unicode from the clipboard when using pywin32. Closes ipythongh-3386 Also catches the empty clipboard case and displays a short error message, instead of a huge traceback.
ipython3 version: 0.13.2
python3 version: 3.3.2
OS: Mac OS X 10.8.3
The text was updated successfully, but these errors were encountered: