Skip to content

"'NumberHandler' object has no attribute 'arrayByteCount'" Error #2

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

Open
lion117 opened this issue Feb 4, 2020 · 2 comments
Open

Comments

@lion117
Copy link

lion117 commented Feb 4, 2020

Describe the bug
When I run those demos , only tu1 and tu2 could work. the left demo report error .

Expected behavior
here is my error report

Traceback (most recent call last):
  File "src\wrapper.pyx", line 66, in OpenGL_accelerate.wrapper.CArgCalculatorElement.c_call
  File "D:\Anaconda3\lib\site-packages\OpenGL\GL\images.py", line 499, in __call__
    return arraydatatype.ArrayDatatype.arrayByteCount(arg)
  File "src\arraydatatype.pyx", line 257, in OpenGL_accelerate.arraydatatype.ArrayDatatype.arrayByteCount
AttributeError: ("'NumberHandler' object has no attribute 'arrayByteCount'", 6, <OpenGL.platform.baseplatform.glCompressedTexImage2D object at 0x000000000BD590D8>)

Desktop (please complete the following information):

  • OS: windows 7 sp1
  • python37

I had fix some grammar error . but I had no idea about this error. Any suggestion?

@jcteng
Copy link
Owner

jcteng commented May 8, 2020

version problem, this demo only works on python27x ,do not use python3x

@chaojijun52
Copy link

I've got these demos work on python2.7 in linux except tu_04_1_ue4model.py. To get rid of the issue asked in this topic, you need to remove the parameter "size" from the method "glCompressedTexImage2D":
`glCompressedTexImage2D(GL_TEXTURE_2D, level, format, width, height,
0, ddsbuffer[offset:offset+size])
#glCompressedTexImage2D(GL_TEXTURE_2D, level, format, width, height,

0, size, ddsbuffer[offset:offset + size])`

Then you got it run.

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

3 participants