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

CODE_MAX_STRING_ARRAY_LENGTH parameter is invalid #10254

Closed
5 tasks done
nooooom opened this issue Nov 4, 2024 · 3 comments
Closed
5 tasks done

CODE_MAX_STRING_ARRAY_LENGTH parameter is invalid #10254

nooooom opened this issue Nov 4, 2024 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@nooooom
Copy link

nooooom commented Nov 4, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

CODE_MAX_STRING_ARRAY_LENGTH parameter is invalid.I noticed a similar error in the previous issues in version 0.7.2, but now it appears again in version 0.10.2

✔️ Expected Behavior

The code node verifies the set length when returning the string array

❌ Actual Behavior

image
image

Copy link

dosubot bot commented Nov 4, 2024

@nooooom Hello there! I'm here to help you with bugs, answer questions, and guide you on becoming a contributor. Let's work together to resolve the issue you're facing while we wait for a human maintainer.

The CODE_MAX_STRING_ARRAY_LENGTH parameter is used to enforce a maximum length constraint on string arrays during code execution. If the length of a string array exceeds the specified maximum (default is 30), it raises an OutputValidationError [1][2].

In your case, it seems like the parameter is being considered invalid, which might be due to the string array exceeding this maximum length. Ensure that the string arrays being processed do not exceed the length specified by CODE_MAX_STRING_ARRAY_LENGTH. If you need to allow longer arrays, you can adjust this parameter in your configuration, particularly in the Docker setup, where it defaults to 30 unless specified otherwise [3].

If this issue was present in version 0.7.2 and has reappeared in version 0.10.2, it might be worth checking if there have been any recent changes or commits related to this parameter that could have reintroduced the issue. Unfortunately, I couldn't find specific changes between these versions regarding this parameter [4].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Nov 4, 2024
@Hisir0909
Copy link
Contributor

Hisir0909 commented Nov 4, 2024

Please modify it in .env. .env has default values, so the 3000 you specified in the compose file won't be used.

@nooooom
Copy link
Author

nooooom commented Nov 4, 2024

Please modify it in .env. .env has default values, so the 3000 you specified in the compose file won't be used.

Thanks bro, it's solved!

@nooooom nooooom closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants