L5 - Python error (PermissionError)

I’m getting a “Permissions Error” when executing the third step in the “Don’t forget to save the gravy” lesson:


PermissionError Traceback (most recent call last)
File /usr/local/lib/python3.9/site-packages/semantic_kernel/connectors/ai/open_ai/services/open_ai_text_embedding.py:69, in OpenAITextEmbedding.generate_embeddings_async(self, texts, batch_size)
68 batch = texts[i : i + batch_size]
—> 69 response: Any = await openai.Embedding.acreate(
70 **model_args,
71 api_key=self._api_key,
72 api_type=self._api_type,
73 api_base=self._endpoint,
74 api_version=self._api_version,
75 organization=self._org_id,
76 input=batch,
77 )
78 # make numpy arrays from the response

File /usr/local/lib/python3.9/site-packages/openai/api_resources/embedding.py:73, in Embedding.acreate(cls, *args, **kwargs)
72 try:
—> 73 response = await super().acreate(*args, **kwargs)
75 # If a user specifies base64, we’ll just return the encoded string.
76 # This is only for the default case.

any ideas? thanks

I get a PermissionError as well in the 7th cell of the notebook (the cell for reseting the memory store. The shutil function is unable to remove the directory tree because Chromadb is still using it. The error is: [WinError 32] The process cannot access the file because it is being used by another process: ‘mymemories\chroma.sqlite3’.

Looks like I am getting something different from above. Just curious that they both are permissions issues.

Hi @jlsimmons33 & @Chanquete,

Thanks for reporting this.

I’m seeing the error as well. Let me report it.

Best, Mubsi

P.S ar you running the notebook on the platform or locally ?

I was/am running mine locally. It’s not really a workaround, but I found that if I restarted the kernel, then I can run the shutil function successfully. Then I just need to restart the semantic kernel with the chromadb.

This still seems like it should work differently. As much as I can tell the chromadb process releases the memory to the semantic kernel…but there is no way to release the memory from the semantic kernel.

This is now fixed on the platform.