2

I am trying to learn python using https://automatetheboringstuff.com.

While on IDLE (Python 3.5 - 64 Bits), windows 8.1), pyperclip.copy('test') gives the following error message

pyperclip.copy('test') Traceback (most recent call last): File "", line 1, in pyperclip.copy('test') File "C:\Python\lib\site-packages\pyperclip__init__.py", line 53, in _copyWindows ctypes.cdll.msvcrt.wcscpy(ctypes.c_wchar_p(pchData), text) OSError: exception: access violation writing 0x0000000000000000

Any help is appreciated !

MrMokari
  • 125
  • 1
  • 1
  • 7

1 Answers1

2

The problem appears to be the 64-bit version of Python on some windows PCs.

I had this problem when using the same version of Python 3.5 as you (64-bit - Windows x86-64 executable installer). I didn't have this problem in Python 3.4, but I am using the 32-bit version of that release. I just downloaded and installed the 32-bit version of Python 3.5 (Windows x86 executable installer) and it doesn't give me the issue when using pyperclip.

  • That fixed it! Thanks a bunch! – MrMokari Oct 23 '15 at 08:08
  • Thank you very much! I don't have a Win8 or Win10 box handy for testing, but this info really helps. I'm marking the source code of Pyperclip with this answer so we can fix it in a near version. – Al Sweigart Oct 30 '15 at 17:33