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

module 'numpy' has no attribute 'product' #5

Closed
arGth56 opened this issue Feb 9, 2025 · 1 comment
Closed

module 'numpy' has no attribute 'product' #5

arGth56 opened this issue Feb 9, 2025 · 1 comment

Comments

@arGth56
Copy link

arGth56 commented Feb 9, 2025

When doing :

python -m celery -A stdweb worker --loglevel=info

I have :

python -m celery -A stdweb worker --loglevel=info
Traceback (most recent call last):
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/utils.py", line 69, in getitem
return self._engines[alias]
~~~~~~~~~~~~~^^^^^^^
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/main.py", line 19, in
main()
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/main.py", line 15, in main
sys.exit(_main())
^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/bin/celery.py", line 236, in main
return celery(auto_envvar_prefix="CELERY")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/click/core.py", line 1161, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/bin/base.py", line 135, in caller
return f(ctx, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/bin/worker.py", line 348, in worker
worker = app.Worker(
^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/worker/worker.py", line 93, in init
self.app.loader.init_worker()
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/loaders/base.py", line 110, in init_worker
self.import_default_modules()
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/loaders/base.py", line 104, in import_default_modules
raise response
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/utils/dispatch/signal.py", line 276, in send
response = receiver(signal=self, sender=sender, **named)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/fixups/django.py", line 100, in on_import_modules
self.worker_fixup.validate_models()
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/celery/fixups/django.py", line 140, in validate_models
run_checks()
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/core/checks/templates.py", line 10, in check_templates
for engine in engines.all():
^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/utils.py", line 94, in all
return [self[alias] for alias in self]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/utils.py", line 94, in
return [self[alias] for alias in self]
~~~~^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/utils.py", line 85, in getitem
engine = engine_cls(params)
^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 26, in init
options["libraries"] = self.get_templatetag_libraries(libraries)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 88, in get_templatetag_libraries
libraries = get_installed_libraries()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 162, in get_installed_libraries
return {
^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 162, in
return {
^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 151, in get_template_tag_modules
for name in get_package_libraries(pkg):
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/django/template/backends/django.py", line 174, in get_package_libraries
module = import_module(entry[1])
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/stdweb/templatetags/filters.py", line 102, in
from astropy.table import Table
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/astropy/table/init.py", line 6, in
from .column import Column, ColumnInfo, MaskedColumn, StringTruncateWarning
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/astropy/table/column.py", line 11, in
from astropy.units import Quantity, StructuredUnit, Unit
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/astropy/units/init.py", line 23, in
from .quantity import *
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/astropy/units/quantity.py", line 35, in
from .quantity_helper import can_have_arbitrary_unit, check_output, converters_and_unit
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/astropy/units/quantity_helper/init.py", line 16, in
from . import erfa, function_helpers, helpers, scipy_special
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/astropy/units/quantity_helper/function_helpers.py", line 74, in
np.prod, np.product, np.cumprod, np.cumproduct,
^^^^^^^^^^
File "/Users/pierre-yveslechapelain/Documents/Astro/soft/stdweb/venv/lib/python3.11/site-packages/numpy/init.py", line 414, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'product'

I created a bug report at astropy : astropy/astropy#17746

@karpov-sv
Copy link
Owner

Should be fixed by 45f18f6

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