Skip to main content

Schemdraw AttributeError: 'Text' object has no property 'math_fontfamily'

When I used Method label of schemdraw.elements.xxxx, I got an error message ERROR: AttributeError: 'Text' object has no property 'math_fontfamily'.
This error happened in matplotlib. The property 'math_fontfamily' may be changed to 'mathtext.fontset'. But the ploblem was the version of Schemdraw that is 0.15.
pip install schemdraw==0.15
import schemdraw.elements as elm
d = schemdraw.Drawing()
d += elm.Resistor().label('6.8KΩ')
d.draw()
# AttributeError: 'Text' object has no property 'math_fontfamily'

When I installed version=0.14, no error appeared.
pip install schemdraw==0.14
import schemdraw.elements as elm
d = schemdraw.Drawing()
d += elm.Resistor().label('6.8KΩ')
d.draw()

With version=0.14, no more error.

Comments