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

devcontainer error using Docker Dev Environments - Dify Backend API #1272

Closed
jf-xia opened this issue Oct 5, 2023 · 0 comments
Closed

devcontainer error using Docker Dev Environments - Dify Backend API #1272

jf-xia opened this issue Oct 5, 2023 · 0 comments
Labels
🐞 bug Something isn't working

Comments

@jf-xia
Copy link

jf-xia commented Oct 5, 2023

Dify version

main

Cloud or Self Hosted

Self Hosted

Steps to reproduce

devcontainer error using Docker Dev Environments - Dify Backend API:

  1. Start backend:
    flask run --host 0.0.0.0 --port=5001 --debug

Reason:
old version watchdog in /opt/conda/lib/python3.11/site-packages (2.1.6)


Need to do:
pip install --upgrade watchdog

✔️ Expected Behavior

vscode ➜ /workspaces/dify/api (main) $ flask run --host 0.0.0.0 --port=5001 --debug
/opt/conda/lib/python3.11/site-packages/feedparser/encodings.py:29: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi

  • Debug mode: on
    INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5001
  • Running on http://172.17.0.2:5001
    INFO:werkzeug:Press CTRL+C to quit
    INFO:werkzeug: * Restarting with watchdog (inotify)
    /opt/conda/lib/python3.11/site-packages/feedparser/encodings.py:29: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    import cgi
    WARNING:werkzeug: * Debugger is active!
    INFO:werkzeug: * Debugger PIN: 128-417-477

❌ Actual Behavior

vscode ➜ /workspaces/dify/api (main) $ flask run --host 0.0.0.0 --port=5001 --debug
/opt/conda/lib/python3.11/site-packages/feedparser/encodings.py:29: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi

  • Debug mode: on
    INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5001
  • Running on http://172.17.0.2:5001
    INFO:werkzeug:Press CTRL+C to quit
    Traceback (most recent call last):
    File "/opt/conda/bin/flask", line 8, in
    sys.exit(main())
    ^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/flask/cli.py", line 1064, in main
    cli.main()
    File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
    ^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/flask/cli.py", line 924, in run_command
    run_simple(
    File "/opt/conda/lib/python3.11/site-packages/werkzeug/serving.py", line 1097, in run_simple
    run_with_reloader(
    File "/opt/conda/lib/python3.11/site-packages/werkzeug/_reloader.py", line 440, in run_with_reloader
    reloader = reloader_loops[reloader_type](
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.11/site-packages/werkzeug/_reloader.py", line 315, in init
    from watchdog.events import EVENT_TYPE_OPENED
    ImportError: cannot import name 'EVENT_TYPE_OPENED' from 'watchdog.events' (/opt/conda/lib/python3.11/site-packages/watchdog/events.py)
@jf-xia jf-xia added the 🐞 bug Something isn't working label Oct 5, 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
Projects
None yet
Development

No branches or pull requests

2 participants