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

ninja and unicode error #20

Open
imfurkaann opened this issue Oct 13, 2023 · 1 comment
Open

ninja and unicode error #20

imfurkaann opened this issue Oct 13, 2023 · 1 comment

Comments

@imfurkaann
Copy link

C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\venv\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Error checking compiler version for cl: 'utf-8' codec can't decode byte 0x87 in position 5: invalid start byte
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1673, in _run_ninja_build
env=env)
File "C:\Users\MSI\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 12, in
from models.Alignment import Alignment
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\models\Alignment.py", line 3, in
from models.Net import Net
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\models\Net.py", line 3, in
from models.stylegan2.model import Generator
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\models\stylegan2\model.py", line 11, in
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\models\stylegan2\op_init_.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\models\stylegan2\op\fused_act.py", line 15, in
os.path.join(module_path, "fused_bias_act_kernel.cu"),
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1091, in load
keep_intermediates=keep_intermediates)
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1302, in _jit_compile
is_standalone=is_standalone)
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1407, in _write_ninja_file_and_build_library
error_prefix=f"Error building extension '{name}'")
File "C:\Users\MSI\Desktop\xpack-ninja-build-1.11.0-1\bin\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1682, in _run_ninja_build
message += f": {error.output.decode()}" # type: ignore
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 4044: invalid start byte

please can you help? How can I solve this error

@saltukozelgul
Copy link

Before running the main.py file use the "chcp 65001" command on the terminal that you are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants