Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Workflow Error: Windows Support #83

Open
p8h-74 opened this issue Nov 25, 2024 · 11 comments
Open

GH Workflow Error: Windows Support #83

p8h-74 opened this issue Nov 25, 2024 · 11 comments
Assignees
Labels
python Pull requests that update Python code

Comments

@p8h-74
Copy link

p8h-74 commented Nov 25, 2024

When will the build error on Windows x64 be fixed?

@Labfox
Copy link
Owner

Labfox commented Nov 25, 2024

For now, the error isn't with GitHub workflows, but more with simply building Whatsfly for Windows, and fixing this problem seems to come from other libraries, so it would need direct development on Windows, and I personally don't have a test machine to do that. So feel free to make a pull request if you get it working.

@Labfox
Copy link
Owner

Labfox commented Nov 25, 2024

I've tweaked a bit the workflow (apparently the libraries got updated since the last time I tried), it seems to build correctly, can you test on Windows ?

@Eikosa
Copy link

Eikosa commented Nov 26, 2024

I've tweaked a bit the workflow (apparently the libraries got updated since the last time I tried), it seems to build correctly, can you test on Windows ?

I got this error

File ~\AppData\Roaming\Python\Python310\site-packages\whatsfly\dependencies\builder.py:106, in ensureUsableBinaries()
    [105](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:105) if rq.status_code != 200:
--> [106](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:106)     raise RuntimeError(
    [107](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:107)         f"Server responded with {rq.status_code}, impossible to find the binaries, giving up"
    [108](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:108)     )
    [109](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:109) open(f"{root_dir.replace('dependencies', '')}/dependencies/{get_dll_filename()}", "wb").write(rq.content)

RuntimeError: Server responded with 404, impossible to find the binaries, giving up
...
    [118](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:118)     )
    [119](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:119) except Exception:
--> [120](https://untitled+.vscode-resource.vscode-cdn.net/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:120)     raise RuntimeError("Impossible to find the binaries, giving up")

RuntimeError: Impossible to find the binaries, giving up

@Labfox
Copy link
Owner

Labfox commented Nov 26, 2024

can you run this ?:

import whatsfly.dependencies.builder

print(whatsfly.dependencies.builder.get_dll_filename())

@Labfox Labfox changed the title Error GH Worlflow GH Workflow Error: Windows Support Nov 26, 2024
@Labfox Labfox added the python Pull requests that update Python code label Nov 26, 2024
@Labfox Labfox self-assigned this Nov 26, 2024
@Labfox Labfox moved this to In progress in @Labfox's Road to v1.0.0 Nov 26, 2024
@Eikosa
Copy link

Eikosa commented Nov 26, 2024

can you run this ?:

import whatsfly.dependencies.builder

print(whatsfly.dependencies.builder.get_dll_filename())

Still same:

import whatsfly.dependencies.builder

print(whatsfly.dependencies.builder.get_dll_filename())
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
File ~\AppData\Roaming\Python\Python310\site-packages\whatsfly\dependencies\builder.py:106, in ensureUsableBinaries()
    [105](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:105) if rq.status_code != 200:
--> [106](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:106)     raise RuntimeError(
    [107](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:107)         f"Server responded with {rq.status_code}, impossible to find the binaries, giving up"
    [108](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:108)     )
    [109](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:109) open(f"{root_dir.replace('dependencies', '')}/dependencies/{get_dll_filename()}", "wb").write(rq.content)

RuntimeError: Server responded with 404, impossible to find the binaries, giving up

During handling of the above exception, another exception occurred:

RuntimeError                              Traceback (most recent call last)
Cell In[1], [line 1](vscode-notebook-cell:?execution_count=1&line=1)
----> [1](vscode-notebook-cell:?execution_count=1&line=1) import whatsfly.dependencies.builder
      [3](vscode-notebook-cell:?execution_count=1&line=3) print(whatsfly.dependencies.builder.get_dll_filename())

File ~\AppData\Roaming\Python\Python310\site-packages\whatsfly\__init__.py:18
     [14](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/__init__.py:14) import logging
     [16](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/__init__.py:16) from .dependencies.builder import ensureUsableBinaries
---> [18](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/__init__.py:18) ensureUsableBinaries()
     [20](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/__init__.py:20) try:
     [21](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/__init__.py:21)     from .whatsapp import WhatsApp

File ~\AppData\Roaming\Python\Python310\site-packages\whatsfly\dependencies\builder.py:120, in ensureUsableBinaries()
    [116](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:116)     open(f"{root_dir.replace('dependencies', '')}/dependencies/{get_dll_filename(h=True)}", "wb").write(
    [117](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:117)         rq.content
    [118](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:118)     )
    [119](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:119) except Exception:
--> [120](https://file+.vscode-resource.vscode-cdn.net/e%3A/Yaz%C4%B1l%C4%B1m/Python/whatsfly%20bot/~/AppData/Roaming/Python/Python310/site-packages/whatsfly/dependencies/builder.py:120)     raise RuntimeError("Impossible to find the binaries, giving up")

RuntimeError: Impossible to find the binaries, giving up

@Labfox
Copy link
Owner

Labfox commented Nov 27, 2024

Just noticed you were using Whatsfly 0.1.3. This was fixed in 0.2.1. You can install with pip using whatsfly-labfox

@p8h-74
Copy link
Author

p8h-74 commented Nov 29, 2024

Just noticed you were using Whatsfly 0.1.3. This was fixed in 0.2.1. You can install with pip using whatsfly-labfox

How do it this ?

@p8h-74
Copy link
Author

p8h-74 commented Nov 29, 2024

Только что заметил, что вы используете Whatsfly 0.1.3. Это было исправлено в версии 0.2.1. Вы можете установить с помощью pip с помощью whatsfly-labfox

Traceback (most recent call last): File "C:\DOP FILES\Test\main.py", line 1, in <module> import whatsfly.dependencies.builder File "C:\DOP FILES\Test\venv\Lib\site-packages\whatsfly\__init__.py", line 18, in <module> ensureUsableBinaries() ~~~~~~~~~~~~~~~~~~~~^^ File "C:\DOP FILES\Test\venv\Lib\site-packages\whatsfly\dependencies\builder.py", line 87, in ensureUsableBinaries build() ~~~~~^^ File "C:\DOP FILES\Test\venv\Lib\site-packages\whatsfly\dependencies\builder.py", line 71, in build status_code = subprocess.check_call(go_build_cmd, cwd=f"whatsfly/dependencies") File "C:\Users\Дом\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 414, in check_call retcode = call(*popenargs, **kwargs) File "C:\Users\Дом\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 395, in call with Popen(*popenargs, **kwargs) as p: ~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Дом\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1036, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pass_fds, cwd, env, ^^^^^^^^^^^^^^^^^^^ ...<5 lines>... gid, gids, uid, umask, ^^^^^^^^^^^^^^^^^^^^^^ start_new_session, process_group) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Дом\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1548, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ # no special security ^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... cwd, ^^^^ startupinfo) ^^^^^^^^^^^^ NotADirectoryError: [WinError 267] Неверно задано имя папки

@p8h-74
Copy link
Author

p8h-74 commented Nov 29, 2024

Just noticed you were using Whatsfly 0.1.3. This was fixed in 0.2.1. You can install with pip using whatsfly-labfox

`
import whatsfly.dependencies.builder

print(whatsfly.dependencies.builder.get_dll_filename())
`

Installing collected packages: whatsfly Successfully installed whatsfly-0.0.231 PS C:\DOP FILES\Test> python main.py whatsmeow/whatsmeow-windows-amd64.dll

@Labfox
Copy link
Owner

Labfox commented Dec 10, 2024

?

It seems like your python/windows install is buggy. Also it is whatsfly-Labfox, not whatsfly

@Abdurrafey-Siddiqui
Copy link

Hi @Labfox

Great thanks for the project. The docs seem to be outdated and hence why even I noticed that whatsfly was installed when following the installation steps

When running pip install whatsfly-labfox it installed the correct one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
Status: In progress
Development

No branches or pull requests

4 participants