You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
start and visit, if I revert this commit(bab5c54),it will be ok
✔️ Expected Behavior
No response
❌ Actual Behavior
Traceback (most recent call last):
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 948, in app
raise err from None
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/werkzeug/debug/init.py", line 342, in debug_application
app_iter = self.app(environ, start_response)
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 948, in app
raise err from None
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 937, in run_command
app: WSGIApplication = info.load_app()
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 339, in load_app
app = locate_app(import_name, None, raise_if_not_found=False)
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 245, in locate_app import(module_name)
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/app.py", line 3, in
from configs import dify_config
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/configs/init.py", line 3, in
dify_config = DifyConfig()
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/pydantic_settings/main.py", line 167, in init
super().init(
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/pydantic/main.py", line 212, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for DifyConfig
LOG_TZ
String should have at least 1 character [type=string_too_short, input_value='', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/string_too_short
The text was updated successfully, but these errors were encountered:
Hey @mayiming0708! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's tackle this together!
It seems like you're encountering a ValidationError related to the LOG_TZ configuration in the DifyConfig class. The error indicates that the LOG_TZ field is expected to have at least one character, but it appears to be an empty string.
The LOG_TZ configuration is used to set the timezone for log timestamps, and it should be a valid timezone name according to the IANA Time Zone Database, such as 'America/New_York' [1][2].
To resolve this issue, ensure that the LOG_TZ field in your configuration is set to a valid timezone string. If you don't need to specify a timezone, you can set it to None, which will use the system's default timezone.
If the issue persists after setting a valid timezone, it might be related to changes introduced in the commit bab5c542197f935d35fe75eb5d2c3301fbbf58b4. Unfortunately, I don't have specific details on what changes were made in that commit, but reverting it seems to resolve the issue according to your description. You might want to review the changes in that commit to understand how it affects the LOG_TZ validation.
Self Checks
Dify version
bab5c54
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
start and visit, if I revert this commit(bab5c54),it will be ok
✔️ Expected Behavior
No response
❌ Actual Behavior
Traceback (most recent call last):
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 948, in app
raise err from None
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/werkzeug/debug/init.py", line 342, in debug_application
app_iter = self.app(environ, start_response)
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 948, in app
raise err from None
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 937, in run_command
app: WSGIApplication = info.load_app()
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 339, in load_app
app = locate_app(import_name, None, raise_if_not_found=False)
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/flask/cli.py", line 245, in locate_app
import(module_name)
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/app.py", line 3, in
from configs import dify_config
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/configs/init.py", line 3, in
dify_config = DifyConfig()
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/pydantic_settings/main.py", line 167, in init
super().init(
File "/Users/antk/Documents/code/github.com/langgenius/dify/api/.venv/lib/python3.10/site-packages/pydantic/main.py", line 212, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for DifyConfig
LOG_TZ
String should have at least 1 character [type=string_too_short, input_value='', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/string_too_short
The text was updated successfully, but these errors were encountered: