los-cocos / cocos

graphic library for games and multimedia, for python language on PC-like hardware
http://los-cocos.github.io/cocos-site/
Other
633 stars 146 forks source link

test_batch TypeError: int expected instead of float #325

Closed ccanepa closed 5 years ago

ccanepa commented 5 years ago

invalid, see #327

After fixing #314 now test_batch crashes with

(py-cocos) E:\dev\cocos2019\test>python test_batch.py
Traceback (most recent call last):
  File "test_batch.py", line 53, in <module>
    main()
  File "test_batch.py", line 50, in main
    director.run (main_scene)
  File "..\cocos\director.py", line 406, in run
    event_loop.run()
  File "e:\dev\pyglet-2019\pyglet\app\base.py", line 175, in run
    self._run()
  File "e:\dev\pyglet-2019\pyglet\app\base.py", line 187, in _run
    timeout = self.idle()
  File "e:\dev\pyglet-2019\pyglet\app\base.py", line 314, in idle
    window.dispatch_event('on_draw')
  File "e:\dev\pyglet-2019\pyglet\window\__init__.py", line 1330, in dispatch_ev
ent
    if EventDispatcher.dispatch_event(self, *args) != False:
  File "e:\dev\pyglet-2019\pyglet\event.py", line 403, in dispatch_event
    self._raise_dispatch_exception(event_type, args, handler, exception)
  File "e:\dev\pyglet-2019\pyglet\event.py", line 466, in _raise_dispatch_except
ion
    raise exception
  File "e:\dev\pyglet-2019\pyglet\event.py", line 400, in dispatch_event
    if handler(*args):
  File "..\cocos\director.py", line 465, in on_draw
    self.fps_display.tick()
  File "..\cocos\fps.py", line 147, in tick
    self.label.update_info(self.fps, self.min_fps)
  File "..\cocos\fps.py", line 247, in update_info
    self.label.text = self.template.format(*args)
  File "e:\dev\pyglet-2019\pyglet\text\__init__.py", line 294, in text
    self.document.text = text
  File "e:\dev\pyglet-2019\pyglet\text\document.py", line 300, in text
    self.insert_text(0, text)
  File "e:\dev\pyglet-2019\pyglet\text\document.py", line 431, in insert_text
    self.dispatch_event('on_insert_text', start, text)
  File "e:\dev\pyglet-2019\pyglet\event.py", line 403, in dispatch_event
    self._raise_dispatch_exception(event_type, args, handler, exception)
  File "e:\dev\pyglet-2019\pyglet\event.py", line 466, in _raise_dispatch_except
ion
    raise exception
  File "e:\dev\pyglet-2019\pyglet\event.py", line 400, in dispatch_event
    if handler(*args):
  File "e:\dev\pyglet-2019\pyglet\text\layout.py", line 1045, in on_insert_text
    self._init_document()
  File "e:\dev\pyglet-2019\pyglet\text\layout.py", line 1034, in _init_document
    self._update()
  File "e:\dev\pyglet-2019\pyglet\text\layout.py", line 972, in _update
    line.start, line.boxes, context)
  File "e:\dev\pyglet-2019\pyglet\text\layout.py", line 1467, in _create_vertex_
lists
    box.place(self, i, x, y, context)
  File "e:\dev\pyglet-2019\pyglet\text\layout.py", line 373, in place
    ('c4B/dynamic', colors))
  File "e:\dev\pyglet-2019\pyglet\graphics\__init__.py", line 373, in add
    vlist._set_attribute_data(i, array)
  File "e:\dev\pyglet-2019\pyglet\graphics\vertexdomain.py", line 453, in _set_a
ttribute_data
    region.array[:] = data
TypeError: int expected instead of float

win7 64.bits, python 3.7

pyglet: commit 58dfdb6314fc900cfbba6355b79bb09e718a41c9 master github Author: Benjamin Moran Date: Fri Aug 9 09:43:50 2019 +0900

cocos 1da2121a5ce10c master Author: Claudio Canepa Date: Sun Aug 11 22:52:59 2019 -0300

ccanepa commented 5 years ago

closed as invalid, see #327