demberto / demberto/PyFLP

🐞 Example Code of "Implementing a plugin data parser" doesn't work

Open
#190 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
212
Forks
30
PR merge metrics
No merged PRs in 30d

Description

### Describe the issue

![Screenshot 2024-05-11 154712](https://github.com/demberto/PyFLP/assets/120498921/66e8c325-e09a-4fc1-800b-771bf92e4e2f)
Hello,
I tried the example code from the "Walkthrough: Implementing a plugin data parser" from the documentation. I followed each step as mentioned and then some errors occured

**This is the first error Message:**

_Traceback (most recent call last):
File "c:\Users\Silver Shepherd Lap\Documents\Coding\Code Projekte\.xpj zu .flp\Sammelsurium\FLP Decontructor - Fruity Balance VorlagenTest_3.py", line 8, in
events = project.events_asdict()
^^^^^^^^^^^^^^^^^^^^^
AttributeError: **'Project' object has no attribute 'events_asdict'_**

The Compiler doesn't seem to know teh command "events_asdict"

And in other scenarios the ".struct" command is also not as an attribute there.
But maybe that is because the "events_asdict()" command is needed to create this attribute.

The Fruity Balance Demo FLP was created in FL Studio 21.2.3

Hopefully someone can help.

### What version of PyFLP are you using?

2.2.2dev6

### What code caused this issue?

```python3
import pyflp
from pyflp.plugin import PluginID

# Parse the FLP file into a project
project = pyflp.parse("fruity-balance.flp")

# Collect all the events as a dict of ID to event
events = project.events_asdict()

# Get the first plugin data event - the Fruity Balance one itself
plugin_data_event = events[PluginID.Data][0]

# Get the raw data and convert it to a tuple of 8-bit unsigned integers
data = tuple(bytearray(plugin_data_event._struct))
print(data)
```

### Screenshots, Additional info

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.