lordofwizard / mcserver

Free Minecraft Server hosting Shell Scripts, Works on Google Cloud Shell. Flawlessly
GNU General Public License v3.0
126 stars 144 forks source link

python error #5

Closed Mubassim closed 3 years ago

Mubassim commented 3 years ago

i am from youtube i had error with script.py

Mubassim commented 3 years ago

Traceback (most recent call last): File "script.py", line 1, in from pynput.keyboard import Key, Controller File "/home/faaam208/.local/lib/python3.7/site-packages/pynput/init.py", line 40, in from . import keyboard File "/home/faaam208/.local/lib/python3.7/site-packages/pynput/keyboard/init.py", line 31, in backend = backend(name) File "/home/faaam208/.local/lib/python3.7/site-packages/pynput/_util/init.py", line 82, in backend if resolutions else '') ImportError: this platform is not supported: ('failed to acquire X connection: Bad display name ""', DisplayNameError(''))

Try one of the following resolutions:

lordofwizard commented 3 years ago

mate you have to open powershell in your windows computer... i don't know much about windows tho but open powershell (you must have python installed on it btw) then do these commands pip install pynput and then you need to download the script.py to your local windows 10 machine and then run the script init.. a tip... if you use cloudshell sdk it will be nice

Mubassim commented 3 years ago

bro but i want to play while server is running and i want to use my pc while server is on :(

lordofwizard commented 3 years ago

bro but i want to play while server is running and i want to use my pc while server is on :(

Do you have a android phone?.. i use it to keep my server alive.. sometimes.. and we( me and my friends) we have a shitty laptop.. which runs debian btw. we use it to keep the server alive.. with that script.. with pynput.. if you got a another device lying around then that's great use it.. otherwise you have to do that manually :100:

Mubassim commented 3 years ago

Bro Any way because i dont want to pay the electricity bills