Skip to content

🐞 Python 3.12 Enum issue #183

Description

@kingkongjames

Describe the issue

Thats the whole code. When I try to run, this happens:

Traceback (most recent call last):
File "C:\Users\Stefan\PycharmProjects\fl_changer\main.py", line 6, in
project = pyflp.parse("res/beat.flp")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Stefan\PycharmProjects\fl_changer\venv\Lib\site-packages\pyflp_init_.py", line 123, in parse
id = EventEnum(int.from_bytes(stream.read(1), "little"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Stefan\AppData\Local\Programs\Python\Python312\Lib\enum.py", line 744, in call
raise TypeError(
TypeError: <enum 'EventEnum'> has no members; specify names=() if you meant to create a new, empty, enum

What does that mean?
Thank you.

What version of PyFLP are you using?

2.2.1

What code caused this issue?

import pathlib
import sys
import pyflp
project = pyflp.parse("res/beat.flp")

Screenshots, Additional info

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. demberto commented on Nov 7, 2023

    @demberto
    Owner

    Hmm, I haven't tested PyFLP on Python 3.12 yet. It's difficult for me to find time for this nowadays.

  2. changed the title [-]Something wrong with Parsing the File🐞 [/-] [+]🐞 Python 3.12 Enum issue[/+] on Nov 7, 2023
  3. Robatortas commented on Apr 9, 2024

    @Robatortas

    The same issue reproduces on my project too.

  4. SilverShepherd commented on Apr 13, 2024

    @SilverShepherd

    I have the same issue

  5. Mister-SOSA commented on Apr 18, 2024

    @Mister-SOSA

    Same issue here as well

  6. Bigmancozmo commented on Jun 20, 2024

    @Bigmancozmo

    Same issue here, but on Python 3.11.9.

  7. Lilicogamer13 commented on Sep 4, 2024

    @Lilicogamer13

    same issue here, but in all python 3 versions(like, littery, all the starting with 3 versions that is here https://www.python.org/doc/versions/), but only in windows

  8. bartvanandel commented on Oct 25, 2024

    @bartvanandel

    The problem persists on MacOS as well. I've tried it with a stock template file, using Python 3.12.7:

    import pyflp as flp
    p = flp.parse('/Applications/Audio/FL Studio 2024.app/Contents/Resources/FL/Data/Templates/Advanced/Electronic/Drum & Bass.flp')

    Different paths, same error.

  9. naweka commented on Nov 21, 2024

    @naweka

    Same error, python 3.12.7

  10. naweka commented on Nov 21, 2024

    @naweka

    fast dirty fix:
    image

    image

    image

  11. MichaelTen commented on Jan 1, 2025

    @MichaelTen

    thanks @naweka that worked!

    I created a pull request to do conditional usage of your "dirty fix" #196 (merge at not my risk - i did not test it - i just implemented the "dirty fix" directly for my usage.)

    i also created a mini project to extra sample file paths in the case where they cannot be located and unfortunately FL Studio does not have a built in easy peasy way of seeing where FL Studio thinks the samples are (so they can be moved there or whatever to get the FL Studio project to load OK)

    https://github.com/MichaelTen/FL-Studio-file-path-extractor

    for anyone curious to implement the "dirty fix" .... use command "pip show pyflp" to see where the actually files are located to directly edit them.

  12. Windows81 commented on Feb 11, 2026

    @Windows81

    For a cleaner fix, I'd look into python/cpython#114474.

  13. ancientstraits commented on Apr 26, 2026

    @ancientstraits

    What would it require in order to resolve this issue correctly?

  14. Windows81 commented on Apr 26, 2026

    @Windows81

    @ancientstraits: it would require the original dev eloper to take any of our proposed fixes and merge them to the project.

  15. Lilicogamer13 commented on Apr 27, 2026

    @Lilicogamer13

    holy vibecoded

  16. westclox-star commented on May 2, 2026

    @westclox-star

    fixed it on my fork and made a pr for this. https://github.com/westclox-star/FLPy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions