PyTibia icon indicating copy to clipboard operation
PyTibia copied to clipboard

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

Open Vallorlo opened this issue 1 year ago • 3 comments

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.

Vallorlo avatar Jul 01 '23 17:07 Vallorlo

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)

mateuszk131 avatar Jul 02 '23 12:07 mateuszk131

@mateuszk131 can you open PR with your fix?

lucasmonstrox avatar Jul 10 '23 14:07 lucasmonstrox

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.

felipetnh avatar Jul 11 '23 17:07 felipetnh