M5Burner on Linux throws some Python errors

  • I downloaded 2.1.6 M5Burner onto Fedora Core 32 Linux workstation.
    UI starts up fine. I can download firmware images.
    I see my M5Stack Basic on /dev/ttyUSB0, I have access.

    However, whenever I click the "Burn" button, for ANY of the images I download, I get this:

    Start Burn
    --chip esp32 --port /dev/ttyUSB0 --baud 1500000 --before default_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 /home/timotej/m5/M5Burner/packages/fw/core/Core2FactoryTest-v1.2.bin
    Traceback (most recent call last):
      File "/home/timotej/m5/M5Burner/packages/tools/esptool.py", line 21, in <module>
        import argparse
      File "/usr/lib64/python3.8/argparse.py", line 88, in <module>
        import re as _re
      File "/usr/lib64/python3.8/re.py", line 145, in <module>
        class RegexFlag(enum.IntFlag):
    AttributeError: module 'enum' has no attribute 'IntFlag'
     Burn Failed 

    Help, please?

  • @platycore I came here to find a solution myself, same error running on my Linux setup.
    After Googling it, all the responses where "pip uninstall -y enum34", but that was not the case.
    I found something interesting here: https://stackoverflow.com/questions/47878060/why-is-the-re-module-trying-to-import-enum-intflag
    I looked at the app location M5Burner_Linux/packages/tools/enum and that was it... the app has the wrong version of enum.

    • Remove the one with the underscores: "_ init _.py"
    • Copy the version of enum.py located in your /usr/lib/python3.8 path

    That worked for me.