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

Error when doing python3 visualizer.py #66

Open
GreenLimeSia opened this issue Nov 14, 2021 · 13 comments
Open

Error when doing python3 visualizer.py #66

GreenLimeSia opened this issue Nov 14, 2021 · 13 comments

Comments

@GreenLimeSia
Copy link

I use miniconda to create an env with conda create -f evn.yml.

Screenshots
Traceback (most recent call last):
File "/home1/yangnan/stylegan3/visualizer.py", line 340, in
main()
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home1/yangnan/stylegan3/visualizer.py", line 286, in main
viz = Visualizer(capture_dir=capture_dir)
File "/home1/yangnan/stylegan3/visualizer.py", line 34, in init
super().init(title='GAN Visualizer', window_width=380, window_height=210)
File "/home1/yangnan/stylegan3/gui_utils/imgui_window.py", line 38, in init
self._imgui_renderer = _GlfwRenderer(self._glfw_window)
File "/home1/yangnan/stylegan3/gui_utils/imgui_window.py", line 97, in init
super().init(*args, **kwargs)
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/imgui/integrations/glfw.py", line 13, in init
super(GlfwRenderer, self).init()
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/imgui/integrations/opengl.py", line 60, in init
super(ProgrammablePipelineRenderer, self).init()
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/imgui/integrations/base.py", line 17, in init
self._create_device_objects()
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/imgui/integrations/opengl.py", line 108, in _create_device_objects
self._attrib_location_tex = gl.glGetUniformLocation(self._shader_handle, "Texture")
File "src/latebind.pyx", line 51, in OpenGL_accelerate.latebind.Curry.call
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 430, in glGetUniformLocation
return baseOperation( program, name )
File "/home1/yangnan/miniconda3/envs/stylegan3/lib/python3.9/site-packages/OpenGL/platform/baseplatform.py", line 415, in call
return self( *args, **named )
File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGetUniformLocation,
cArguments = (1, b'Texture\x00'),
result = -1
)

1636859260(1)

Desktop (please complete the following information):

  • OS: [e.g. Linux Ubuntu 20.04]
  • PyTorch version (e.g., pytorch 1.9.0)
  • CUDA toolkit version (e.g., CUDA 11.4)
  • NVIDIA driver version
  • GPU [e.g., Titan RTX]
  • Docker: did you use Docker? No
    Additional context
    Add any other context about the problem here.
@Qingcsai
Copy link

I meet exactly the same error when running python visualizer.py as:

OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGetUniformLocation,
cArguments = (1, b'Texture\x00'),
result = -1
)

Desktop (please complete the following information):

OS: [e.g. Linux Ubuntu 18.04]
PyTorch version (e.g., pytorch 1.8.0)
CUDA toolkit version (e.g., CUDA 11.4)
NVIDIA driver version
GPU [e.g., GeForce GTX TITAN X]
Docker: did you use Docker? No
Additional context
Add any other context about the problem here.

@GreenLimeSia
Copy link
Author

GreenLimeSia commented Nov 14, 2021

Do you fix the above problems? I try to test OpenGL and find it is no problem. However, I cannot solve this problem. Could you give us some instructions in your spare time? @nurpax

@Qingcsai
Copy link

Do you fix the above problems after changing pytorch1.8.0 and Ubuntu18.04? @Qingcsai

Well, it's still not working in my environment for pytorch1.8.0 and Ubuntu18.04.

@GreenLimeSia
Copy link
Author

GreenLimeSia commented Nov 14, 2021

Me too. I cannot solve this problem in Ubuntu. @Qingcsai However, Now, it works on Windows 10.
OS: [e.g. Win 10]
PyTorch version (e.g., PyTorch 1.10)
CUDA toolkit version (e.g., CUDA 11.5)
NVIDIA driver version: 469.13
Visual Studio: 2019 Community
GPU [e.g., GeForce RTX 3070]
Hope this helps you. @Qingcsai

@vanga
Copy link

vanga commented Dec 10, 2021

I am seeing the same issue when trying to run this using remote desktop for VM running in GCP..

@GreenLimeSia
Copy link
Author

I would suggest you do it on Windows 10. It works for me. @vanga

@vanga
Copy link

vanga commented Dec 10, 2021

Thanks @GreenLimeSia. I have a Mac M1 and I couldn't set up the dependencies, which is why I was trying with a GCP VM with remote desktop where I ran the training.

@everdrone
Copy link

everdrone commented Dec 10, 2021

@GreenLimeSia on Windows 10 is crashing for me right after loading the network, while on Ubuntu (20.04) it works flawlessly

@GreenLimeSia
Copy link
Author

Thanks for your valuable suggestions, I will try it on local ubuntu. @everdrone

@arthur-qiu
Copy link

Try it: export MESA_GL_VERSION_OVERRIDE=3.3. It works for me.

@kabelkavoj
Copy link

kabelkavoj commented Jan 7, 2022

Can confim, the solution suggested by @arthur-qiu works for me too.

Desktop:
OS: WSL2 Ubuntu 5.10.60.1, Windows 11
PyTorch version: 1.9.1
CUDA toolkit version: 11.1
NVIDIA driver version: 510.06
GPU: RTX 3090
Docker: did you use Docker? No

@pfeducode
Copy link

试试看:导出 MESA_GL_VERSION_OVERRIDE=3.3。这个对我有用。

you are right, I use it solve this problem. my System is Ubuntu20.04

@jivaklong
Copy link

I try it: export MESA_GL_VERSION_OVERRIDE=3.3. But the following error still occurred, My computer is configured with MAC 2.4 GHz 8-core Intel Core i9

raise self._errorClass(

OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGetUniformLocation,
cArguments = (1, b'Texture\x00'),
result = -1
)

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

8 participants