Why Does My Code Work in Personal Workspace But Not in Team Workspace?

This topic was automatically generated from Slack. You can find the original thread here.

Hello,
There is a strange thing hapeening when i am running my code in personal workspace it works well but if i am executing the same code in the team workspace it is throwing error.
The code is absolutely same and all the keys are also same .
What is the possible reason for this ?

could you share the screenshot of your whole action?

The reason might be the code you use hardcoded some information that is not matched with the OpenAI you’re using

But then how is it working fine on personal space

Is the environment variable AD_OPENAI_API_KEY set in your team workspace?

Yes

I think this might not be Pipedream issue, could you try to google the error?

Actually there is no error in code as it runs very well in personal space but when i run it in teams space it throws error , and when googled about it gives suggestions which are already implemented

As this is your specific code that I couldn’t reproduce. I would suggest to narrow down the issue scope to pinpoint the exact part that caused the error. Then try to determine what’s the different between your Pipedream team workspace and Pipedream personal workspace

To be very precise , it gives error for new OpenAIEmbeddings({
openAIApiKey:process.env.AD_OPENAI_API_KEY
}),{ pineconeIndex });

Which is same in both the workspaces

you can create a node.js code step and print this value [process.env.AD](http://process.env.AD)_OPENAI_API_KEY to see if is correctly set in your team workspace

i have already verified it

Then what about the Pinecone index?

That is also given the same and verified

Help out us please:slightly_smiling_face:

I have also checked in the personal workspace it works fine, looks some issue on team workspace, although env and all the key details are checked completely.

@U04JCP8CUHZ can you enable support access for the workflow and email support@pipedream.com?

Sure

, have written the mail to support@pipedream.com regarding the issue where the workflow in team space is throwing error and in personal space works well
and also enabled support access.

Prompt attention on this issue will be appreciated.

Posted thread to Discourse: Why Does My Code Work in My Personal Workspace but Throw an Error in the Team Workspace?