Coded Workflow, Generate Code does not work

Hello, I’m using coded workflow for the first time. I’m trying to use the “Code Generation” activity but I continue getting an error. I’m testing something simple , setting an int variable to three. This is the error I get:

image

Hey @David_Hernandez2 ,

Can you try changing in the prompt the second part of the statement from :
‘Set it two 5’

To :
‘Set it to 5’

Hope it helps.

Happy automating.!!

Please mark this as solution if it helps you.

Thanks ,
Gautham.

I looked further into the exception message and its:

Result:
Forbidden

Do I need to enable generate code access somewhere?

Hey @David_Hernandez2 ,

Yes please check the role’s access in orchestrator ->Tenant → Manage Access → Roles tab of the particular bot you are trying to use the prompt in.

Thanks,
Gautham.

I’m doing this in UiPath studio directly, under my account which is an admin.

@David_Hernandez2,

Any validation errors in your project will block the generation. Try to fix any validation error in the code first and then try to generate code.

Thanks,
Ashok :slightly_smiling_face: