Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Error in notebook 00-getting-started "field "memory" not yet prepared" #3104

Closed
sqlshep opened this issue Oct 9, 2023 · 12 comments
Closed
Assignees
Labels
bug Something isn't working python Pull requests for the Python Semantic Kernel

Comments

@sqlshep
Copy link

sqlshep commented Oct 9, 2023

Describe the bug
While running python notebook 00-getting-started, in the last cell, that performs the "print(joke_function("time travel to dinosaur age"))". I receive the following error

**"ConfigError: field "memory" not yet prepared so type is still a ForwardRef, you might need to call SKContext.update_forward_refs()." **

I tried the SK Code in three notebooks, get the same error in all of them

To Reproduce
Steps to reproduce the behavior:
Load and run notebook 00-getting-started all the cells to the last cell

Expected behavior
Preferably not fail...

Screenshots
If applicable, add screenshots to help explain your problem.

Platform

  • OS: [Mac]
  • IDE: [Jupyter Notebook]
  • Language: [Python]
  • Source: [cloned main repository]

Additional context
None

@shawncal shawncal added python Pull requests for the Python Semantic Kernel triage labels Oct 9, 2023
@github-actions github-actions bot changed the title Error in notebook 00-getting-started "field "memory" not yet prepared" Python: Error in notebook 00-getting-started "field "memory" not yet prepared" Oct 9, 2023
@alliscode alliscode removed the triage label Oct 9, 2023
@AdarshAcharya5
Copy link
Contributor

AdarshAcharya5 commented Oct 10, 2023

@sqlshep I tried running the notebook and it seems to work fine. (Windows 10).

Screenshot (489)

Could you provide more context?. Specifically, your python3 version and the chat service you used. (AzureChatCompletion or OpenAIChatCompletion). This most likely seems like a python3 version problem.

@sqlshep
Copy link
Author

sqlshep commented Oct 10, 2023

Python 3.8.8

It is from this notebook,
https://github.com/microsoft/semantic-kernel/blob/main/python/notebooks/00-getting-started.ipynb
i made no changes to it or the skill, or anything for that matter.

I tried GPT-3.5 and GPT-4

@matthewbolanos matthewbolanos moved this to Backlog - Documentation in Semantic Kernel Oct 10, 2023
@matthewbolanos matthewbolanos added the bug Something isn't working label Oct 26, 2023
@matthewbolanos matthewbolanos moved this from Backlog - Documentation to Bugs in Semantic Kernel Oct 26, 2023
@MikeAinOz
Copy link

Is there a work-around for this problem?

@MikeAinOz
Copy link

Hi @matthewbolanos , I'm trying to find the status on this issue/bug, can you help me? I know it's out there I just don't know how to find it.

@MikeAinOz
Copy link

MikeAinOz commented Nov 17, 2023

I have a work around @sqlshep @matthewbolanos . The problem appears to be the pydantic package. I use conda, so i created a new environment, made sure there was no pydantic package, installed ipykernel and now the notebook runs ok

Stop Press: it may not be pydantic that's causing the problem as it still is there!

@matthewbolanos
Copy link
Member

Assigning @moonbox3 to take a look at this issue to see why it might be happening.

@MikeAinOz
Copy link

MikeAinOz commented Nov 28, 2023 via email

@moonbox3
Copy link
Contributor

Hi @MikeAinOz, @sqlshep

if you do a pip list can you confirm the semantic-kernel installed version shows as:

semantic-kernel 0.3.15.dev0

For my understanding: do you use virtual environments? I'm going to have to find access to an Apple device, potentially, to try and repro.

@MikeAinOz
Copy link

MikeAinOz commented Nov 30, 2023 via email

@moonbox3
Copy link
Contributor

moonbox3 commented Dec 1, 2023

@MikeAinOz thanks for your reply. As a quicker way to unblock you, any chance you could use Poetry and set up SK per the following DEV_SETUP guidelines? Because we use Poetry you can easily create a virtual environment and install the necessary dependencies.

If it's a must to use Anaconda then I'll need to spend some time next week trying to repro the issue. It can be difficult to do given how Anaconda may set up the kernel, and such.

@MikeAinOz
Copy link

MikeAinOz commented Dec 4, 2023 via email

@moonbox3
Copy link
Contributor

moonbox3 commented Dec 4, 2023

Hi @MikeAinOz thank you for the update. Glad to hear you are now unblocked. Let's close this issue for now, and if you hit anything else related to this one, feel free to open it up. Otherwise, you can create a new issue, and we'll take a look.

@moonbox3 moonbox3 closed this as completed Dec 4, 2023
@github-project-automation github-project-automation bot moved this from Bugs to Sprint: Done in Semantic Kernel Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

No branches or pull requests

9 participants