Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samplefunc = self.samples[params['note']] KeyError: 'F6' #15

Open
johnp39 opened this issue Jan 8, 2024 · 1 comment
Open

samplefunc = self.samples[params['note']] KeyError: 'F6' #15

johnp39 opened this issue Jan 8, 2024 · 1 comment

Comments

@johnp39
Copy link

johnp39 commented Jan 8, 2024

Hi! When running your PlanetaryOrbits python program I have encountered the following problem
play
generator.py", line 672, in play
samplefunc = self.samples[params['note']]
KeyError: 'F6'

This occurs within PyCharm or terminal.

Would you please have a look at this please, for me.

Thank you.

John

@james-trayford
Copy link
Owner

Hi @johnp39 - I think this may be coming about because of where you are running the notebook example - this error usually comes up due to not finding the samples to read in. The line:

sampler = Sampler("../data/samples/solar_system")

in the notebook is a relative path, so running outside the example directory will not find the samples.

Looking a bit more, there may be other aspects of this example that is broken, due to changes in the sample read routine. I am looking to patch that here: #16 .

  • Does running it in the examples sub directory, or changing the path above to point to the correct place (i.e. the ./data/samples/solar_system subdirectory in the strauss repo) fix this current error?

  • What operating system are you running on?

once the above changes are merged, I'll let you know and this example should run as expected in the latest main branch version, thanks for bringing it to my attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants