Title: After using xclip in linux(ubuntu:20.04) py(calling pyperclip.copy(message)), the node failed to receive the result and eventually timed out · Issue #313 · extrabacon/python-shell · GitHub
Open Graph Title: After using xclip in linux(ubuntu:20.04) py(calling pyperclip.copy(message)), the node failed to receive the result and eventually timed out · Issue #313 · extrabacon/python-shell
X Title: After using xclip in linux(ubuntu:20.04) py(calling pyperclip.copy(message)), the node failed to receive the result and eventually timed out · Issue #313 · extrabacon/python-shell
Description: Describe the bug ts-node-dev test/test_pyperclip.ts I found that the process is stuck. I'm not sure if it's a problem with the implementation of pyperclip.copy itself in the linux system or a problem with the implementation of python-she...
Open Graph Description: Describe the bug ts-node-dev test/test_pyperclip.ts I found that the process is stuck. I'm not sure if it's a problem with the implementation of pyperclip.copy itself in the linux system or a probl...
X Description: Describe the bug ts-node-dev test/test_pyperclip.ts I found that the process is stuck. I'm not sure if it's a problem with the implementation of pyperclip.copy itself in the linux system or...
Opengraph URL: https://github.com/extrabacon/python-shell/issues/313
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"After using xclip in linux(ubuntu:20.04) py(calling pyperclip.copy(message)), the node failed to receive the result and eventually timed out","articleBody":"**Describe the bug**\nts-node-dev test/test_pyperclip.ts\nI found that the process is stuck. I'm not sure if it's a problem with the implementation of pyperclip.copy itself in the linux system or a problem with the implementation of python-shell itself (such as using clipping or buffer conflicts, etc.\nWhat I can be sure of is that pyperclip.copy works as scheduled and it won't block the py process, but the node process just keeps waiting, which puzzles me a lot\n\n**Python code**\n```py\n# test_pyperclip.py\n# test_pyperclip.py\nimport pyperclip\n\n\ndef main():\n message = \"你好\"\n pyperclip.copy(message)\n return\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n**Javascript code**\n```ts\nimport path from 'path'\nimport { PythonShell } from 'python-shell'\n\nPythonShell.run(path.resolve(__dirname, 'test_pyperclip.py'), {\n pythonPath: path.resolve(__dirname, '../.venv/bin/python3'),\n env: { ...process.env, DISPLAY: ':1' },\n}).then(\n (res) =\u003e {\n console.log({ res })\n },\n (err) =\u003e {\n console.log({ err })\n }\n)\n```\n\n**Expected behavior**\nThe code will execute to console.log({res}).\n\n**Actual behavior**\nEven if the py process has ended after the PythonShell.run() call, the Promise remains in the pending state\n\n**Other Information (please complete the following information):**\n - OS: [e.g. ubuntu:20.04 \u0026 apt-get install xclip]\n - Python Version [e.g. 3.11.12]\n - Node Version [e.g. v22.14.0]\n\n","author":{"url":"https://github.com/zq0904","@type":"Person","name":"zq0904"},"datePublished":"2025-07-01T03:10:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/313/python-shell/issues/313"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5493ddbd-82c4-ead5-0e2e-77f5e4c27a03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0B8:14207:6A14E0A:88C94EC:69757701 |
| html-safe-nonce | cbdc16532704ea05394cca1627be49cef3355ae689318210bfa3b008ea5f6bcc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEI4OjE0MjA3OjZBMTRFMEE6ODhDOTRFQzo2OTc1NzcwMSIsInZpc2l0b3JfaWQiOiI4MzQ1OTI4NTk4MjE2MzQxMjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8015ea8c2465acd63afeb0165549d24844a08f4732f858b6a1fc43e174bc99dd |
| hovercard-subject-tag | issue:3190524164 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/extrabacon/python-shell/313/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8de5be74a7168f20b243529ff1e0469e9a19dbefa9c3c633b5800a4e0362ef6e/extrabacon/python-shell/issues/313 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8de5be74a7168f20b243529ff1e0469e9a19dbefa9c3c633b5800a4e0362ef6e/extrabacon/python-shell/issues/313 |
| og:image:alt | Describe the bug ts-node-dev test/test_pyperclip.ts I found that the process is stuck. I'm not sure if it's a problem with the implementation of pyperclip.copy itself in the linux system or a probl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zq0904 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/extrabacon/python-shell git https://github.com/extrabacon/python-shell.git |
| octolytics-dimension-user_id | 1558613 |
| octolytics-dimension-user_login | extrabacon |
| octolytics-dimension-repository_id | 17671651 |
| octolytics-dimension-repository_nwo | extrabacon/python-shell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17671651 |
| octolytics-dimension-repository_network_root_nwo | extrabacon/python-shell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width