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

Running into an error "Complex assignments are not allowed" #277

Closed
sy276 opened this issue Apr 1, 2024 · 6 comments
Closed

Running into an error "Complex assignments are not allowed" #277

sy276 opened this issue Apr 1, 2024 · 6 comments

Comments

@sy276
Copy link

sy276 commented Apr 1, 2024

Describe the bug
Running into the following error when trying to call sql_pull_data plugin -
Error on line 1: df_employees, description_employees = sql_pull_data("pull data from employees table") => Complex assignments are not allowed

To Reproduce
Steps to reproduce the behavior:

  1. Set the code verification to true in the config file like this "code_interpreter.code_verification_on": true
  2. Have some data ready in the db file
  3. Ask TaskWeaver to pull the data from the database

Expected behavior
I expect TaskWeaver to pull the data from the db along with the description of what it pulled.

Environment Information:

  • OS: Linux
  • Python Version: 3.10.13
  • LLM that you're using: Google Gemini
  • Other Configurations: "code_interpreter.code_verification_on": true
@liqul liqul closed this as completed May 9, 2024
@sy276
Copy link
Author

sy276 commented May 10, 2024

@liqul - I am still facing the issue with the sql_pull_data plugin when code_interpreter.code_verification_on is set to true. Since the issue was closed without providing a resolution, I wanted to bring this to your attention again.

As a workaround, I’m considering simplifying the assignment as follows:
df_employees = sql_pull_data("pull data from employees table")

However, this modification doesn’t return the description of the data pulled, which is part of the expected behavior.

Would you recommend simplifying the assignment like this? Or is there another way we can resolve this issue while still pulling the description of the data?

Thank you for your time and consideration.

@liqul
Copy link
Contributor

liqul commented May 10, 2024

@liqul - I am still facing the issue with the sql_pull_data plugin when code_interpreter.code_verification_on is set to true. Since the issue was closed without providing a resolution, I wanted to bring this to your attention again.

As a workaround, I’m considering simplifying the assignment as follows: df_employees = sql_pull_data("pull data from employees table")

However, this modification doesn’t return the description of the data pulled, which is part of the expected behavior.

Would you recommend simplifying the assignment like this? Or is there another way we can resolve this issue while still pulling the description of the data?

Thank you for your time and consideration.

May I know more on why you need to turn on the code verification on since this is blocked by a pre-defined verification rule.

@liqul
Copy link
Contributor

liqul commented May 10, 2024

Created a PR to fix this issue.

ShilinHe added a commit that referenced this issue May 10, 2024
The previous check accidently forbids complex assignment, which should
be allowd.

See this issue:
#277
@sy276
Copy link
Author

sy276 commented May 11, 2024

@liqul - I am still facing the issue with the sql_pull_data plugin when code_interpreter.code_verification_on is set to true. Since the issue was closed without providing a resolution, I wanted to bring this to your attention again.
As a workaround, I’m considering simplifying the assignment as follows: df_employees = sql_pull_data("pull data from employees table")
However, this modification doesn’t return the description of the data pulled, which is part of the expected behavior.
Would you recommend simplifying the assignment like this? Or is there another way we can resolve this issue while still pulling the description of the data?
Thank you for your time and consideration.

May I know more on why you need to turn on the code verification on since this is blocked by a pre-defined verification rule.

I enabled code verification to restrict TaskWeaver's package installation and import capabilities. This ensures TaskWeaver only accesses whitelisted modules in allowed_modules config setting. This also helps prevent unauthorized system file access and files from other sessions. I think this added security is particularly important for local runs outside of Docker.

@liqul
Copy link
Contributor

liqul commented May 11, 2024

Please pull the latest version and try again.

@sy276
Copy link
Author

sy276 commented May 12, 2024

Please pull the latest version and try again.

I pulled the latest version and it's working without issues now. Thanks @liqul!

Closing the issue now.

@sy276 sy276 closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants