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

'ColoredRenderer' object has no attribute 'vbo_verts_face' #12

Open
xmk2222 opened this issue Aug 6, 2020 · 9 comments
Open

'ColoredRenderer' object has no attribute 'vbo_verts_face' #12

xmk2222 opened this issue Aug 6, 2020 · 9 comments

Comments

@xmk2222
Copy link

xmk2222 commented Aug 6, 2020

  File "/home/xumingkai/.local/lib/python3.6/site-packages/chumpy/ch.py", line 555, in r
    self._call_on_changed()
  File "/home/xumingkai/.local/lib/python3.6/site-packages/chumpy/ch.py", line 550, in _call_on_changed
    self.on_changed(self._dirty_vars)
  File "/home/xumingkai/.local/lib/python3.6/site-packages/opendr/renderer.py", line 1080, in on_changed
    self.vbo_verts_face.set_array(np.array(self.verts_by_face).astype(np.float32))
AttributeError: 'ColoredRenderer' object has no attribute 'vbo_verts_face'
@rupang818
Copy link

I'm seeing the same problem. Were you able to resolve this?

@lisa676
Copy link

lisa676 commented Mar 23, 2021

I'm also facing this same issue. Would you like to help me to solve the problem?

I think need to install this opendr but I'm unable to install this opendr.

@iegorval
Copy link

I have the same issue. Any updates on this? I want to adapt the code from https://github.com/mattloper/opendr to https://github.com/polmorenoc/opendr, but I am not sure how to proceed with 'vbo_verts_face'.

@AmitSharma1127
Copy link

Still stuck on the same issue. Tried to make modifications in the renderer.py file where the vbo_verts_face is mentioned. Couldn't figure out how to make it work.

@iegorval
Copy link

@AmitSharma1127 I've ended up using the original opendr from https://github.com/mattloper/opendr, just changed some float divisions to be compatible with Python 3 by integer conversion. Otherwise, seems to work ok even with Python 3.

@AmitSharma1127
Copy link

@iegorval I am trying to install opendr which you mentioned but I am having errors in python headers.

/opendr$ make
python2.7 setup.py build_ext --inplace
running build_ext
building 'opendr.contexts.ctx_mesa' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -D__OSMESA__=1 -Iopendr/contexts -I. -I/home/aaplgpu/.local/lib/python2.7/site-packages/numpy/core/include -Iopendr/contexts/OSMesa/include -I/usr/include/python2.7 -c opendr/contexts/ctx_mesa.c -o build/temp.linux-x86_64-2.7/opendr/contexts/ctx_mesa.o -lstdc++
In file included from /usr/include/python2.7/Python.h:63:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:10:12: error: unknown type name ‘Py_hash_t’
 PyAPI_FUNC(Py_hash_t) _Py_HashDouble(double);
            ^
/usr/include/python2.7/pyport.h:793:34: note: in definition of macro ‘PyAPI_FUNC’
 #       define PyAPI_FUNC(RTYPE) RTYPE
                                  ^
In file included from /usr/include/python2.7/Python.h:90:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:10:23: error: conflicting types for ‘_Py_HashDouble’
 PyAPI_FUNC(Py_hash_t) _Py_HashDouble(double);
                       ^
In file included from /usr/include/python2.7/Python.h:87:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/object.h:517:18: note: previous declaration of ‘_Py_HashDouble’ was here
 PyAPI_FUNC(long) _Py_HashDouble(double);
                  ^
In file included from /usr/include/python2.7/Python.h:63:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:11:12: error: unknown type name ‘Py_hash_t’
 PyAPI_FUNC(Py_hash_t) _Py_HashPointer(void*);
            ^
/usr/include/python2.7/pyport.h:793:34: note: in definition of macro ‘PyAPI_FUNC’
 #       define PyAPI_FUNC(RTYPE) RTYPE
                                  ^
In file included from /usr/include/python2.7/Python.h:90:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:11:23: error: conflicting types for ‘_Py_HashPointer’
 PyAPI_FUNC(Py_hash_t) _Py_HashPointer(void*);
                       ^
In file included from /usr/include/python2.7/Python.h:87:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/object.h:518:18: note: previous declaration of ‘_Py_HashPointer’ was here
 PyAPI_FUNC(long) _Py_HashPointer(void*);
                  ^
In file included from /usr/include/python2.7/Python.h:63:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:12:12: error: unknown type name ‘Py_hash_t’
 PyAPI_FUNC(Py_hash_t) _Py_HashBytes(const void*, Py_ssize_t);
            ^
/usr/include/python2.7/pyport.h:793:34: note: in definition of macro ‘PyAPI_FUNC’
 #       define PyAPI_FUNC(RTYPE) RTYPE
                                  ^
In file included from /usr/include/python2.7/Python.h:90:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:58:9: error: unknown type name ‘Py_hash_t’
         Py_hash_t prefix;
         ^
/usr/include/python2.7/pyhash.h:59:9: error: unknown type name ‘Py_hash_t’
         Py_hash_t suffix;
         ^
/usr/include/python2.7/pyhash.h:71:9: error: unknown type name ‘Py_hash_t’
         Py_hash_t suffix;
         ^
/usr/include/python2.7/pyhash.h:75:9: error: unknown type name ‘Py_hash_t’
         Py_hash_t hashsalt;
         ^
/usr/include/python2.7/pyhash.h:77:3: error: conflicting types for ‘_Py_HashSecret_t’
 } _Py_HashSecret_t;
   ^
In file included from /usr/include/python2.7/Python.h:87:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/object.h:523:3: note: previous declaration of ‘_Py_HashSecret_t’ was here
 } _Py_HashSecret_t;
   ^
In file included from /usr/include/python2.7/Python.h:90:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:78:30: error: conflicting types for ‘_Py_HashSecret’
 PyAPI_DATA(_Py_HashSecret_t) _Py_HashSecret;
                              ^
In file included from /usr/include/python2.7/Python.h:87:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/object.h:524:30: note: previous declaration of ‘_Py_HashSecret’ was here
 PyAPI_DATA(_Py_HashSecret_t) _Py_HashSecret;
                              ^
In file included from /usr/include/python2.7/Python.h:90:0,
                 from opendr/contexts/ctx_mesa.c:51:
/usr/include/python2.7/pyhash.h:88:5: error: expected specifier-qualifier-list before ‘Py_hash_t’
     Py_hash_t (*const hash)(const void *, Py_ssize_t);
     ^
In file included from opendr/contexts/ctx_mesa.c:51:0:
/usr/include/python2.7/Python.h:92:29: fatal error: cpython/pydebug.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 1

Any ideas what's the issue?

Note: I had to download headers manually by copy pasting them from cython github repo.

@iegorval
Copy link

iegorval commented Apr 17, 2021

Note: I had to download headers manually by copy pasting them from cython github repo.

I did not have to download anything external. But I had to pip install Cython.

Any ideas what's the issue?
I am using Python 3, so not sure if there are not some differences. Though that code is from Python 2, so it should work fine, I guess...

@LingSmart
Copy link

I meet the same question ,how to solve it ?

@ismeyueyue
Copy link

this solution will be helpful

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

7 participants