Skip to content

BUG: pd.read_clipboard() not working in WSL2 #39379

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

Closed
2 of 3 tasks
pandichef opened this issue Jan 24, 2021 · 3 comments
Closed
2 of 3 tasks

BUG: pd.read_clipboard() not working in WSL2 #39379

pandichef opened this issue Jan 24, 2021 · 3 comments
Labels
Bug Needs Info Clarification about behavior needed to assess issue Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@pandichef
Copy link

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Code Sample, a copy-pastable example

pd.read_clipboard()

Problem description

I recently started using WSL2 on Windows 10 Pro / Ubuntu 20.04 / Python 3.8.5. In general, It works incredibly well today (unlike in 2018). Unfortunately, pd.read_clipboard() and df.to_clipboard() don't work. I believe the problem is pandas because I got the desired functionality to work using pyperclip directly.

Error Message

pd.read_clipboard()
Traceback (most recent call last):
File "", line 1, in
File "/home/mickeymouse/.local/lib/python3.8/site-packages/pandas/io/clipboards.py", line 38, in read_clipboard
text = clipboard_get()
File "/home/mickeymouse/.local/lib/python3.8/site-packages/pandas/io/clipboard/init.py", line 649, in lazy_load_stub_paste
return paste()
File "/home/mickeymouse/.local/lib/python3.8/site-packages/pandas/io/clipboard/init.py", line 287, in call
raise PyperclipException(EXCEPT_MSG)
pandas.io.clipboard.PyperclipException:
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit
https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error

@pandichef pandichef added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 24, 2021
@MarcoGorelli
Copy link
Member

Hi @pandichef

Can you show the output of pandas.show_versions() (as per the issue template)? I thought this would've been fixed in #38546

@MarcoGorelli MarcoGorelli added the Needs Info Clarification about behavior needed to assess issue label Jan 24, 2021
@pandichef
Copy link
Author

Sorry about that.

INSTALLED VERSIONS
------------------
commit           : 3e89b4c4b1580aa890023fc550774e63d499da25
python           : 3.8.5.final.0
python-bits      : 64
OS               : Linux
OS-release       : 4.19.128-microsoft-standard
Version          : #1 SMP Tue Jun 23 12:58:10 UTC 2020
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : C.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 1.2.0
numpy            : 1.19.5
pytz             : 2020.5
dateutil         : 2.8.1
pip              : 20.0.2
setuptools       : 45.2.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.10.1
IPython          : 7.19.0
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : 3.3.3
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pyxlsb           : None
s3fs             : None
scipy            : 1.6.0
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
numba            : None

@MarcoGorelli
Copy link
Member

OK, thanks - looks like the fix will be in 1.3.0, so closing this as a duplicate of #38527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Info Clarification about behavior needed to assess issue Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants