stefan2200 / TWB

Python based bot for Tribal Wars
GNU General Public License v3.0
100 stars 54 forks source link

Can't launch the twb.py #82

Closed GiambaJ1 closed 6 months ago

GiambaJ1 commented 7 months ago

I launch it by cmd but It lend me to some errrors like: Import error cannont import name 'PyQueryì from 'pyquery' (unknown location); or either error in module from game.village import Village; or either error in module from core.twstats import TwStats; or either errror in module from pyquery import PyQuery as pq.

What should I do??

stefan2200 commented 7 months ago

Running python -m pip install --upgrade -r requirements.txt should solve the issue.

GiambaJ1 commented 7 months ago

Running python -m pip install --upgrade -r requirements.txt should solve the issue.

I don't understand what you mean...

GiambaJ1 commented 7 months ago

I've downloaded all the the file of requirements.txt and added into the bot folder.

SleepingShadow-bit commented 7 months ago

Without Python experience, is it even possible to install and use this?

I exported the files to the install folder but unfortunately I can't open or install anything here :(

Python 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 9:26:36 p.m.) [MSC v.1937 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

python twb.py File "", line 1 python twb.py ^^^ SyntaxError: invalid syntax

Where exactly should the files of the bot be stored in order to be able to execute them?

stefan2200 commented 7 months ago

I think you are trying to launch the bot from inside the Python interpreter. You should be able to execute the bot by opening cmd/powershell in the folder and entering python twb.py. You don't have to launch it from within Python.

SleepingShadow-bit commented 7 months ago

Thank you. ... But next Break PS C:\Users\xxx\Downloads\TWB-master\TWB-master> python twb.py Traceback (most recent call last): File "C:\Users\xxx\Downloads\TWB-master\TWB-master\twb.py", line 5, in import coloredlogs ModuleNotFoundError: No module named 'coloredlogs' PS C:\Users\xxx\Downloads\TWB-master\TWB-master>

--> python -m pip install --upgrade -r requirements.txt =)

stefan2200 commented 6 months ago

Included Windows installer script in 5fef851