OpenNaja / cobra-tools

A suite of GUI tools for extracting and modifying OVL and OVS archives, as well as editing the associated in-house file formats. Also includes a model plugin for Blender. For downloads, guides, and FAQs visit:
https://opennaja.github.io/cobra-tools/
GNU General Public License v3.0
94 stars 27 forks source link

ModuleNotFoundError: No module named 'win32api' #384

Closed EnzoDeg40 closed 2 months ago

EnzoDeg40 commented 2 months ago

Describe the bug I installed python without additional libraries. When he suggested that I install the libraries before running the python file, he forgot to install pywin32. To solve this, a simple pip install pypiwin32 works (not identical to pywin32). (https://stackoverflow.com/a/35948588/13845688)

To Reproduce Command:

python .\ovl_tool_gui.py

Output :

DEBUG:root:Checking for automatic module updates
ERROR:root:imageio not found.
ERROR:root:numpy not found.
ERROR:root:PyQt5 not found.
ERROR:root:PyQt5-Frameless-Window not found.
ERROR:root:vdf not found.
ERROR:root:pillow not found.
Install the missing dependencies? (y/N)
[Type y and hit Enter]
y
...
Traceback (most recent call last):
  File "C:\Users\enzod\Downloads\cobra-tools-master\cobra-tools-master\ovl_tool_gui.py", line 8, in <module>
    from gui import widgets, startup, GuiOptions  # Import widgets before everything except built-ins!
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\enzod\Downloads\cobra-tools-master\cobra-tools-master\gui\__init__.py", line 9, in <module>
    from gui.widgets import MainWindow
  File "C:\Users\enzod\Downloads\cobra-tools-master\cobra-tools-master\gui\widgets.py", line 40, in <module>
    from qframelesswindow import FramelessMainWindow, StandardTitleBar
  File "C:\Users\enzod\AppData\Local\Programs\Python\Python311\Lib\site-packages\qframelesswindow\__init__.py", line 21, in <module>
    from .titlebar import TitleBar, TitleBarButton, SvgTitleBarButton, StandardTitleBar
  File "C:\Users\enzod\AppData\Local\Programs\Python\Python311\Lib\site-packages\qframelesswindow\titlebar\__init__.py", line 8, in <module>
    from ..utils import startSystemMove
  File "C:\Users\enzod\AppData\Local\Programs\Python\Python311\Lib\site-packages\qframelesswindow\utils\__init__.py", line 5, in <module>
    from .win32_utils import WindowsMoveResize as MoveResize
  File "C:\Users\enzod\AppData\Local\Programs\Python\Python311\Lib\site-packages\qframelesswindow\utils\win32_utils.py", line 7, in <module>
    import win32api
ModuleNotFoundError: No module named 'win32api'

Version Info:

HENDRIX-ZT2 commented 2 months ago

Why don't you just re-install python with libraries? Haven't seen this one before...

EnzoDeg40 commented 2 months ago

Why don't you just re-install python with libraries?

Well, if your project needs pypiwin32 then you must indicate it in the project. Yes my python environment is empty, I don't want to install basic libraries which are of no use to me. It's a bit stupid to reinstall python just to have the right library that this project requires.

HENDRIX-ZT2 commented 2 months ago

Good point - however: the requirement for win32api comes from a third-party library (qframelesswindow). They do have it in their requirements.txt file, so something must have gone wrong on your end during installation. https://github.com/zhiyiYo/PyQt-Frameless-Window