-
Hi everyone I tried the pure python tutorial code but it fails with "list index out of range" error. https://docs.flamegpu.com/tutorial/index.html#tutorial-creating-the-circles-model Has anybody an idea how to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 22 replies
-
Hi, I'm not too familiar with the Python native API (It was developed by @mondus). I just built There was an error, It's possible you've made a mistake in following the tutorial. Based on the specific code where the error is occurring, I would assume that method being passed to Could you possibly share your code in a gist so that I can investigate further (and perhaps add a clearer error to the codegen function). |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Ok I've thought about this overnight.
I'm fairly certain PyCharm's PyDev debugger's
exec(compile(contents+"\n", file, 'exec'), glob, loc)
is to blame. Somehow, it's breaking codegen's detection of the function.I've tried moving the tutorial inside a module, but that doesn't break it. So I'll need to find time to install this module to debug this further.
A temporary workaround for yourself would be to instead pass the agent functions as strings, bypassing the detection that is failing.
The original fn