SteamGiftBot
SteamGiftBot copied to clipboard
main.py does not start
When try to start main.py i see this:
Traceback (most recent call last):
File "/home/animeshnyk/SteamGifts/SteamGiftBot/main.py", line 12, in <module>
import _logs as _l
File "/home/animeshnyk/SteamGifts/SteamGiftBot/_logs.py", line 11, in <module>
from PyInquirer import ValidationError, Validator, prompt
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/PyInquirer/__init__.py", line 6, in <module>
from prompt_toolkit.token import Token
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
from .interface import CommandLineInterface
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/interface.py", line 19, in <module>
from .application import Application, AbortAction
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/application.py", line 8, in <module>
from .key_binding.bindings.basic import load_basic_bindings
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
from prompt_toolkit.renderer import HeightIsUnknownError
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/renderer.py", line 11, in <module>
from prompt_toolkit.styles import Style
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
from .from_dict import *
File "/home/animeshnyk/SteamGifts/SteamGiftBot/env/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
Python version:
python -V
Python 3.10.9
OS: Arch Linux with i3-wm
Regarding the python version, 3.10 is not suitable because some of the libraries that were used in writing the script, supported on 3.9.6 and below
If you want to use this script on 3.10 you will have to sacrifice the visual
I try to start main.py again, but from python 3.9.6 version and i still get error:
(my-virtual-env-3.9.6) [animeshnyk@GodOfLinux SteamGiftBot]$ python main.py
______ ______ _____ ___
/ __/ /____ ___ ___ _ / ___(_) _/ /_ / _ \___ ________ ___ ____
_\ \/ __/ -_) _ `/ ' \ / (_ / / _/ __/ / ___/ _ `/ __(_-</ -_) __/
/___/\__/\__/\_,_/_/_/_/ \___/_/_/ \__/ /_/ \_,_/_/ /___/\__/_/
Enjoy using our product!
Created by: github.com/PalmaLuv
Stay tuned for further app updates
Traceback (most recent call last):
File "/home/animeshnyk/SteamGifts/SteamGiftBot/main.py", line 53, in <module>
run()
File "/home/animeshnyk/SteamGifts/SteamGiftBot/main.py", line 26, in run
cookie = _l.askCookie()
File "/home/animeshnyk/SteamGifts/SteamGiftBot/_logs.py", line 72, in askCookie
cookie = ask('input', 'cookie',
File "/home/animeshnyk/SteamGifts/SteamGiftBot/_logs.py", line 64, in ask
keyboard.add_hotkey('ctrl+v', lambda: keyboard.write(clipboard.paste()))
File "/home/animeshnyk/.pyenv/versions/my-virtual-env-3.9.6/lib/python3.9/site-packages/keyboard/__init__.py", line 639, in add_hotkey
_listener.start_if_necessary()
File "/home/animeshnyk/.pyenv/versions/my-virtual-env-3.9.6/lib/python3.9/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
self.init()
File "/home/animeshnyk/.pyenv/versions/my-virtual-env-3.9.6/lib/python3.9/site-packages/keyboard/__init__.py", line 196, in init
_os_keyboard.init()
File "/home/animeshnyk/.pyenv/versions/my-virtual-env-3.9.6/lib/python3.9/site-packages/keyboard/_nixkeyboard.py", line 113, in init
build_device()
File "/home/animeshnyk/.pyenv/versions/my-virtual-env-3.9.6/lib/python3.9/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device
ensure_root()
File "/home/animeshnyk/.pyenv/versions/my-virtual-env-3.9.6/lib/python3.9/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root
raise ImportError('You must be root to use this library on linux.')
ImportError: You must be root to use this library on linux.
(my-virtual-env-3.9.6) [animeshnyk@GodOfLinux SteamGiftBot]$ python -V
Python 3.9.6
(my-virtual-env-3.9.6) [animeshnyk@GodOfLinux SteamGiftBot]$ sudo python main.py
[sudo] пароль до animeshnyk:
Traceback (most recent call last):
File "/home/animeshnyk/SteamGifts/SteamGiftBot/main.py", line 12, in <module>
import _logs as _l
File "/home/animeshnyk/SteamGifts/SteamGiftBot/_logs.py", line 10, in <module>
import six
ModuleNotFoundError: No module named 'six'
then i try pip install six:
(my-virtual-env-3.9.6) [animeshnyk@GodOfLinux SteamGiftBot]$ pip install six
Requirement already satisfied: six in /home/animeshnyk/.pyenv/versions/3.9.6/envs/my-virtual-env-3.9.6/lib/python3.9/site-packages (1.16.0)
(my-virtual-env-3.9.6) [animeshnyk@GodOfLinux SteamGiftBot]$ sudo python main.py
Traceback (most recent call last):
File "/home/animeshnyk/SteamGifts/SteamGiftBot/main.py", line 12, in <module>
import _logs as _l
File "/home/animeshnyk/SteamGifts/SteamGiftBot/_logs.py", line 10, in <module>
import six
ModuleNotFoundError: No module named 'six'
I don't know the solution to the problem at the moment, since everything works fine for me and my friends, but I will try to find it soon.
Video from my Windows 8.1
system [sorry for the quality, that's all I could squeeze out so far].
In the video, I downloaded the files from GitHub, then uninstalled the libraries that were pre-installed for the script to work properly, then reinstalled them.
I am also attaching a screenshot of the launch via commands in REAMDE.md
Microsoft Windows [Version 6.3.9600]
(c) Корпорация Майкрософт (Microsoft Corporation), 2013. Все права защищены.
C:\Users\Alexander\Desktop\Новая папка>python -m venv env
C:\Users\Alexander\Desktop\Новая папка>cd env/scripts
C:\Users\Alexander\Desktop\Новая папка\env\Scripts>activate
(env) C:\Users\Alexander\Desktop\Новая папка\env\Scripts>cd ..
(env) C:\Users\Alexander\Desktop\Новая папка\env>cd ..
(env) C:\Users\Alexander\Desktop\Новая папка>pip install -r requirements.txt
Collecting beautifulsoup4==4.10.0
Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting certifi==2021.5.30
Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting idna==3.2
Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting prompt-toolkit==1.0.14
Using cached prompt_toolkit-1.0.14-py3-none-any.whl (248 kB)
Collecting PyInquirer==1.0.3
Using cached PyInquirer-1.0.3-py3-none-any.whl
Collecting regex==2022.10.31
Using cached regex-2022.10.31-cp39-cp39-win_amd64.whl (267 kB)
Collecting requests==2.27.1
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting six==1.16.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting soupsieve==2.3.1
Using cached soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting termcolor==2.2.0
Using cached termcolor-2.2.0-py3-none-any.whl (6.6 kB)
Collecting urllib3==1.26.6
Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting wcwidth==0.2.5
Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting keyboard==0.13.5
Using cached keyboard-0.13.5-py3-none-any.whl (58 kB)
Collecting clipboard==0.0.4
Using cached clipboard-0.0.4-py3-none-any.whl
Collecting Pygments>=2.2.0
Using cached Pygments-2.14.0-py3-none-any.whl (1.1 MB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting pyperclip>=1.3
Using cached pyperclip-1.8.2-py3-none-any.whl
Installing collected packages: wcwidth, six, urllib3, soupsieve, regex, pyperclip, Pygments, prompt-toolkit, idna, charset-normalizer, certifi, termcolor, requests, PyInquirer, keyboard, clipboard, beautifulsoup4
Successfully installed PyInquirer-1.0.3 Pygments-2.14.0 beautifulsoup4-4.10.0 certifi-2021.5.30 charset-normalizer-2.0.12 clipboard-0.0.4 idna-3.2 keyboard-0.13.5 prompt-toolkit-1.0.14 pyperclip-1.8.2 regex-2022.10.31 requests-2.27.1 six-1.
16.0 soupsieve-2.3.1 termcolor-2.2.0 urllib3-1.26.6 wcwidth-0.2.5
WARNING: You are using pip version 21.1.3; however, version 23.0.1 is available.
You should consider upgrading via the 'c:\users\alexander\desktop\новая папка\env\scripts\python.exe -m pip install --upgrade pip' command.
(env) C:\Users\Alexander\Desktop\Новая папка>python main.py
←[32m ______ ______ _____ ___ ←[0m
←[32m / __/ /____ ___ ___ _ / ___(_) _/ /_ / _ \___ ________ ___ ____←[0m
←[32m _\ \/ __/ -_) _ `/ ' \ / (_ / / _/ __/ / ___/ _ `/ __(_-</ -_) __/←[0m
←[32m /___/\__/\__/\_,_/_/_/_/ \___/_/_/ \__/ /_/ \_,_/_/ /___/\__/_/ ←[0m
←[97m
Enjoy using our product!←[0m
←[31mCreated by: github.com/PalmaLuv
Stay tuned for further app updates←[0m
? Do you want to enter new cookie? No
? Should the bot enter pinned games? Yes
? Select type: All
? What is the minimum number of points to remain? 10
←[97mYou currently have balance 56 points←[0m
←[32mScript running←[0m
←[35mGetting games from page 1←[0m
←[32m💀One more game Othercide←[0m
...
System Windows 8.1