los-cocos / cocos

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

test_batch.py fails with TypeError : sequence item 1... #324

Closed ccanepa closed 5 years ago

ccanepa commented 5 years ago

Invalid, see #327

traceback while running test_batch.py

(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 49, in main
    director.show_FPS = True
  File "..\cocos\director.py", line 389, in set_show_FPS
    self.fps_display.init()
  File "..\cocos\fps.py", line 133, in init
    self.label = InfoLabel(self.template)
  File "..\cocos\fps.py", line 244, in __init__
    self.label = pyglet.text.Label(font, '', color=color, x=10, y=10)
  File "e:\dev\pyglet-2019\pyglet\text\__init__.py", line 451, in __init__
    document = decode_text(text)
  File "e:\dev\pyglet-2019\pyglet\text\__init__.py", line 229, in decode_text
    return decoder.decode(text)
  File "e:\dev\pyglet-2019\pyglet\text\formats\plaintext.py", line 47, in decode

    document.insert_text(0, text)
  File "e:\dev\pyglet-2019\pyglet\text\document.py", line 430, in insert_text
    self._insert_text(start, text, attributes)
  File "e:\dev\pyglet-2019\pyglet\text\document.py", line 434, in _insert_text
    self._text = u''.join((self._text[:start], text, self._text[start:]))
TypeError: sequence item 1: expected str instance, GDIPlusFont found

win7 64.bits, python 3.7

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

cocos: commit 26ef349 master Author: Richard Jones Date: Sun Aug 11 13:15:17 2019 +1000

ccanepa commented 5 years ago

fixed, but now test_batch shows another traceback; reporte at #325

ccanepa commented 5 years ago

oopsie, intended to swap arg1 and arg2, only deleted the first. fixed at

commit 4282ecbf88217f756af1fed5df15bf894a9bc36f master Author: Claudio Canepa Date: Sun Aug 11 23:27:02 2019 -0300

ccanepa commented 5 years ago

Uh Oh, after the second commit crash with

AttributeError: 'GDIPlusFont' object has no attribute 'hfont'

opened #326

ccanepa commented 5 years ago

reopened just to have visibility

ccanepa commented 5 years ago

closed as invalid, see #327