lucasmonstrox / PyTibia

🤖 Fastest Tibia PixelBot. A great bot for Auto, Cavebot, Healing, Macro, Refill, Targeting and Training!
MIT License
259 stars 61 forks source link

[BUG] - error while starting application. any ideas? #75

Open Vallorlo opened 1 year ago

Vallorlo commented 1 year ago

I encountered this error while trying to run the application. I have poetry installed and also python. here's what my cmd says.

PyTibia-main>poetry run python main.py Traceback (most recent call last): File "Desktop\PyTibia-main\main.py", line 2, in from src.gameplay.threads.pyTibia import PyTibiaThread File "Desktop\PyTibia-main\src\gameplay\threads\pyTibia.py", line 12, in from src.gameplay.core.middlewares.window import setTibiaWindowMiddleware File "Desktop\PyTibia-main\src\gameplay\core\middlewares\window.py", line 2, in import win32gui ModuleNotFoundError: No module named 'win32gui'


keep in mind I have pywin32 already installed. idk what to do from here. I already did the command poetry install too.

mateuszk131 commented 1 year ago

I had similar issue with win32con import, how i fixed it: pip install pywin32 Copy pywin32 folder and pywin32.pth from C:\Users\XXX\AppData\Local\Programs\Python\Python39\
to C:\Users\XXX\AppData\Local\pypoetry\Cache\virtualenvs\pytibia-yRHMxwev-py3.9\Lib\site-packages

Not sure if its correct fix, as i cannot seem to get it to work (Healing and combat tabs are empty)

lucasmonstrox commented 1 year ago

@mateuszk131 can you open PR with your fix?

felipetnh commented 1 year ago

If I understood correctly, there won't be a PR, because the fix wasn't on the code, it was actually on poetry virtualenvs. He just copied the pywin32 folder and files from one place to another.