Hi, everyone i'm using oracle arm/amd processor servers with ubuntu 22.04
i have searching for an solution for this over 1 week more than 100 hours
but i had no luck to figure out what is the problem
so if you know about this please help me!
what is problem :
here's a simply code with pyperclip
import pyperclip
string = 'testing'
pyperclip.copy(string)
a = pyperclip.paste()
print()
whenever i execute this code directly in the cli , it is okay to run
However whenever i run this code with schedulers like Crontab or Systemd.timer
(xclip && xsel is already installed)
i got this error and cannot run the code like below
Traceback (most recent call last):
File "/home/ubuntu/web_selenium/pytest.py", line 10, in <module>
pyperclip.copy(string)
File "/usr/lib/python3/dist-packages/pyperclip/__init__.py", line 689, in lazy_load_stub_copy
return copy(text)
File "/usr/lib/python3/dist-packages/pyperclip/__init__.py", line 358, in __call__
raise PyperclipException(EXCEPT_MSG)
pyperclip.PyperclipException:
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit https://pyperclip.readthedocs.io/en/latest/index.html#not-implemented-error
i tried most of solutions in stackoverflow, mostly it was about setting path for interpreter and packages
of course i installed xclip and xsel as well / everything is good when i run code directly through cli
but only when i run code or shell script through Crontab , Systemd.timer, this error is generated
what i have tried
run pyperclip code through shell script with various python env PATH
i tried to lay all the possible env path like /usr/bin:/usr/local/bin .......
and even my python pakages path as .profile and ~./bashrc - failed
set new venv and install all the modules, run code - failed
run as root - failed
install new ubuntu and switch server ubuntu amd -> ubuntu aarch64 - failed
reinstall module - failed
set shebang inside of python script ( whereis python3 - inside of python file - #!/usr/bin/python3.10) - failed
set shell into crontab (SHELL=/bin/bash) - failed
now i'm thinking this is the problem of pyperclip
pleaese help me!
Hi, everyone i'm using oracle arm/amd processor servers with ubuntu 22.04
i have searching for an solution for this over 1 week more than 100 hours
but i had no luck to figure out what is the problem
so if you know about this please help me!
what is problem :
here's a simply code with pyperclip
whenever i execute this code directly in the cli , it is okay to run
However whenever i run this code with schedulers like Crontab or Systemd.timer (xclip && xsel is already installed) i got this error and cannot run the code like below
i tried most of solutions in stackoverflow, mostly it was about setting path for interpreter and packages of course i installed xclip and xsel as well / everything is good when i run code directly through cli but only when i run code or shell script through Crontab , Systemd.timer, this error is generated
run pyperclip code through shell script with various python env PATH i tried to lay all the possible env path like /usr/bin:/usr/local/bin ....... and even my python pakages path as .profile and ~./bashrc - failed
set new venv and install all the modules, run code - failed
run as root - failed
install new ubuntu and switch server ubuntu amd -> ubuntu aarch64 - failed
reinstall module - failed
set shebang inside of python script ( whereis python3 - inside of python file - #!/usr/bin/python3.10) - failed
set shell into crontab (SHELL=/bin/bash) - failed
now i'm thinking this is the problem of pyperclip pleaese help me!