lordmauve / wasabi2d

Cutting-edge 2D game framework for Python
https://wasabi2d.readthedocs.io/
GNU Lesser General Public License v3.0
154 stars 24 forks source link

numpy.VisibleDeprecationWarning, align_offset should be float when it is an array #52

Closed emanueljg closed 4 years ago

emanueljg commented 4 years ago

Traceback:

Traceback (most recent call last):
  File "main.py", line 8, in <module>
    layout.inv.activate()
  File "C:\Users\Emanuel\PycharmProjects\thegame\faces.py", line 88, in activate
    title = None if not self.title else self.scene.layers[self.layer + 1].add_label(**self.title.labelize())
  File "C:\Users\Emanuel\PycharmProjects\thegame\venv\lib\site-packages\wasabi2d\layers.py", line 293, in add_label
    c = Label(
  File "C:\Users\Emanuel\PycharmProjects\thegame\venv\lib\site-packages\wasabi2d\primitives\text.py", line 120, in __init__
    self.text = text  # trigger layout
  File "C:\Users\Emanuel\PycharmProjects\thegame\venv\lib\site-packages\wasabi2d\primitives\text.py", line 154, in text
    self._layout()
  File "C:\Users\Emanuel\PycharmProjects\thegame\venv\lib\site-packages\wasabi2d\primitives\text.py", line 207, in _layout
    verts[glyph_slice] = glyph_verts + (x - align_offset, yoff - descent, 0)
numpy.VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to d
o this, you must specify 'dtype=object' when creating the ndarray

3.8 environment:

mapbox-earcut==0.12.10
moderngl==5.5.4
MouseInfo==0.1.3
multipledispatch==0.6.0
numpy==1.19.0
Pillow==7.1.2
PyAutoGUI==0.9.50
pygame==2.0.0.dev6
PyGetWindow==0.0.8
PyMsgBox==1.0.8
pyperclip==1.8.0
PyRect==0.1.4
pyrr==0.10.3
PyScreeze==0.1.26
PyTweening==1.0.3
six==1.15.0
sortedcontainers==2.2.2
wasabi2d==1.3.0

Debug output after breakpoint at verts[glyph_slice] = glyph_verts + (x - align_offset, yoff - descent, 0) unknown