X ERROR - unsupported types for __and__: 'function', 'int'



  • I keep receiving "X ERROR - unsupported types for _ and _: 'function', 'int' " on my M5Fire for the following code. Sometimes it happens right away, other times it works flawlessly for a little while and then I get the error. Can anyone help with this?

    0_1587593001795_uiflow1.PNG
    from m5stack import *
    from m5ui import *
    from uiflow import *
    import unit

    setScreenColor(0x222222)
    relay0 = unit.get(unit.RELAY, unit.PORTB)
    rfid2 = unit.get(unit.RFID, unit.PORTA)

    label1 = M5TextBox(253, 42, "ID:", lcd.FONT_DejaVu24,0xFFFFFF, rotate=90)
    label2 = M5TextBox(297, 42, "-", lcd.FONT_DejaVu24,0xFFFFFF, rotate=90)
    title = M5Title(title="Workshop", x=7 , fgcolor=0x000000, bgcolor=0xfefefe)
    label4 = M5TextBox(253, 83, "-", lcd.FONT_DejaVu24,0xFFFFFF, rotate=90)

    while True:
    relay0.off()
    label4.setText(str(rfid2.readUid()))
    label2.setColor(0xcccccc)
    label2.setText('Place ID Card')
    while rfid2.isCardOn():
    label4.setText(str(rfid2.readUid()))
    if (rfid2.readUid()) == '8848f1f1c':
    label2.setColor(0x33ff33)
    label2.setText('Proceed')
    relay0.on()
    else:
    label2.setColor(0xff0000)
    label2.setText('Access Denied!')
    break
    wait_ms(2)