demberto / demberto/PyFLP

🐞 Unlocking FLP does not work.

Open
#140 6 comments 0 reactions 1 assignee Claimed by @demberto View on GitHub
bug project-general
Dominant language
Python
Stars
212
Forks
30
PR merge metrics
No merged PRs in 30d

Description

### Describe the issue

The FLP does not work when ran with code. It does gen a new FLP but it is still in trial mode.

### What version of PyFLP are you using?

2.1.0

### What code caused this issue?
```py
import pyflp

project = pyflp.parse(r"C:\Users\coolb\Downloads\Project_4\Project_4 - Copy.flp")

# Unlock the FLP itself
project.registered = True

# Unlock trial version native plugins
for instument in project.channels.instruments:
instrument.demo_mode = False

for insert in project.mixer:
for slot in insert:
if slot.plugin is not None:
slot.plugin.demo_mode = False

pyflp.save(project,r"C:\Users\coolb\Downloads\Project_4\Project_42- Copy.flp")
```

### Screenshots, Additional info

```
PS C:\Users\USER\Downloads\Project_4> python test.py
Traceback (most recent call last):
File "C:\Users\USER\Downloads\Project_4\test.py", line 9, in
for instument in project.channels.instruments:
File "C:\Users\USER\anaconda3\lib\site-packages\pyflp\channel.py", line 1651, in instruments
yield from (ch for ch in self if isinstance(ch, Instrument))
File "C:\Users\USER\anaconda3\lib\site-packages\pyflp\channel.py", line 1651, in
yield from (ch for ch in self if isinstance(ch, Instrument))
File "C:\Users\USER\anaconda3\lib\site-packages\pyflp\channel.py", line 1619, in __iter__
cur_ch = ch_dict[iid] = ct(et, channels=ch_dict, group=groups[groupnum])
IndexError: list index out of range
```

### 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.