Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

AttributeError: 'NoneType' object has no attribute 'decode' #1

Open
cathylacus opened this issue Jun 2, 2020 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'decode' #1

cathylacus opened this issue Jun 2, 2020 · 2 comments

Comments

@cathylacus
Copy link

Thank for your example,I find this error.
Traceback (most recent call last):
File "./main.py", line 26, in
main()
File "./main.py", line 18, in main
if not ctx.initialize(WIDTH, HEIGHT):
File "/test/liwei/PIFu-master/gl-master/libegl/context.py", line 10, in initialize
if not self.initialize_on_device(device, width, height):
File "/test/liwei/PIFu-master/gl-master/libegl/context.py", line 15, in initialize_on_device
print("selected: " + device.name)
File "/test/liwei/PIFu-master/gl-master/libegl/devices/generic.py", line 55, in name
return "EGL device " + devstr.decode('ASCII')
AttributeError: 'NoneType' object has no attribute 'decode'

@cathylacus
Copy link
Author

Ubuntu 16.04 and I just have Command interface without graphical interfaces,it's a server in our school.

@eduble
Copy link
Owner

eduble commented Jun 2, 2020

Hello,
You can try to add a test after this line:

devstr = egl.eglQueryDeviceStringEXT(self.egl_dev, EGL_DRM_DEVICE_FILE_EXT)

Something like that:

    devstr = egl.eglQueryDeviceStringEXT(self.egl_dev, EGL_DRM_DEVICE_FILE_EXT) 
    if devstr is None:
        return "EGL device unknown"

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

No branches or pull requests

2 participants