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

django with celery raise an exception on LoggingProxy #352

Open
nahuelange opened this issue Jun 13, 2019 · 3 comments
Open

django with celery raise an exception on LoggingProxy #352

nahuelange opened this issue Jun 13, 2019 · 3 comments

Comments

@nahuelange
Copy link

When I run through a celery task a call_command, an exception is raised with this stacktrace:

celery_1          |     call_command('my_etl_command', )
celery_1          |   File "/code/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 110, in call_command
celery_1          |     command = load_command_class(app_name, command_name)
celery_1          |   File "/code/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 36, in load_command_class
celery_1          |     module = import_module('%s.management.commands.%s' % (app_name, name))
celery_1          |   File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
celery_1          |     return _bootstrap._gcd_import(name[level:], package, level)
celery_1          |   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
celery_1          |   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
celery_1          |   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
celery_1          |   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
celery_1          |   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
celery_1          |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
celery_1          |   File "/code/src/custom/dataloader/management/commands/etl_features_to_es.py", line 1, in <module>
celery_1          |     import bonobo
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/__init__.py", line 10, in <module>
celery_1          |     from bonobo._api import *
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/_api.py", line 10, in <module>
celery_1          |     from bonobo.execution.strategies import create_strategy
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/strategies/__init__.py", line 9, in <module>
celery_1          |     from bonobo.execution.strategies.executor import ProcessPoolExecutorStrategy, ThreadPoolExecutorStrategy
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/strategies/executor.py", line 7, in <module>
celery_1          |     from bonobo.execution.strategies.base import Strategy
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/strategies/base.py", line 1, in <module>
celery_1          |     from bonobo.execution.contexts.graph import GraphExecutionContext
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/contexts/__init__.py", line 8, in <module>
celery_1          |     from bonobo.execution.contexts.graph import GraphExecutionContext
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/contexts/graph.py", line 9, in <module>
celery_1          |     from bonobo.execution.contexts.node import NodeExecutionContext
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/contexts/node.py", line 12, in <module>
celery_1          |     from bonobo.execution.contexts.base import BaseContext
celery_1          |   File "/code/venv/lib/python3.6/site-packages/bonobo/execution/contexts/base.py", line 6, in <module>
celery_1          |     from mondrian import term
celery_1          |   File "/code/venv/lib/python3.6/site-packages/mondrian/__init__.py", line 23, in <module>
celery_1          |     if sys.stdout.encoding is None or sys.stdout.encoding == "ANSI_X3.4-1968":
celery_1          | AttributeError: 'LoggingProxy' object has no attribute 'encoding'

Versions

  • Bonobo version:

bonobo==0.6.4

  • Python version:

CPython 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]

  • Platform:

Linux 49788264f88a 5.0.0-15-generic #16-Ubuntu SMP Mon May 6 17:41:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

...
@nahuelange
Copy link
Author

This could be a related issue celery/celery#928

@jrmi
Copy link

jrmi commented Sep 16, 2020

fixed by Terralego/visu-back#37

@jrmi
Copy link

jrmi commented Oct 12, 2021

A fix is in progress on mondrian: python-mondrian/mondrian#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants