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

Getting error `No module named '"flower' when running in Kubernetes #1378

Open
ericmeadows opened this issue May 23, 2024 · 1 comment
Open

Comments

@ericmeadows
Copy link

          getting error `    Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/tornado/http1connection.py", line 276, in _read_message
    delegate.finish()
  File "/usr/local/lib/python3.11/site-packages/tornado/routing.py", line 268, in finish
    self.delegate.finish()
  File "/usr/local/lib/python3.11/site-packages/tornado/web.py", line 2395, in finish
    self.execute()
  File "/usr/local/lib/python3.11/site-packages/tornado/web.py", line 2417, in execute
    self.handler = self.handler_class(
                   ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/flower/views/auth.py", line 86, in __new__
    return instantiate(options.auth_provider or NotFoundErrorHandler, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery/utils/imports.py", line 48, in instantiate
    return symbol_by_name(name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kombu/utils/imports.py", line 59, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named '"flower'

in kubernetes environment setup with Github as oauth.spec:
containers:
- args:
- flower
- --url_prefix=core/monitor
- --auth_provider="flower.views.auth.GithubLoginHandler"
- --auth=".*@domain.com"
command:
- celery
env:
- name: FLOWER_OAUTH2_KEY
value: xxx
- name: FLOWER_OAUTH2_SECRET
value: xxx
- name: FLOWER_OAUTH2_REDIRECT_URI
value: xxx`

Originally posted by @krupakar1329 in #1320 (comment)

@ericmeadows ericmeadows changed the title Getting error `No module named '"flower Getting error `No module named '"flower' when running in Kubernetes May 23, 2024
@ericmeadows
Copy link
Author

Solved via --auth_provider=flower.views.auth.GoogleAuth2LoginHandler, not --auth_provider="flower.views.auth.GoogleAuth2LoginHandler"

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

1 participant