Skip to content

Tutorial Python Code Error #1076

Answered by Robadob
bytetec asked this question in Q&A
Jul 5, 2023 · 2 comments · 22 replies
Discussion options

You must be logged in to vote

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

@pyflamegpu.agent_function
def output_message(message_in: pyflamegpu.MessageNone, message_out: pyflamegpu.MessageSpatial2D):
    message_out.setVariableUInt("id", pyflamegpu.getID())
    me…

Replies: 2 comments 22 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
22 replies
@bytetec
Comment options

@Robadob
Comment options

@Robadob
Comment options

@Robadob
Comment options

Answer selected by bytetec
@bytetec
Comment options

@Robadob
Comment options

@bytetec
Comment options

@Robadob
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants