Pyperclip copy causing an OSerror

谁说我不能喝 提交于 2020-01-02 12:41:03

问题


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 !


回答1:


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.



来源:https://stackoverflow.com/questions/32676543/pyperclip-copy-causing-an-oserror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!