Django Logging error on update

143 views
Skip to first unread message

ezra.j.rice

unread,
Sep 7, 2020, 6:35:35 AM9/7/20
to Tethys Platform
I just tried updating my tethys installation to 3.1 from 3.0 and after I did, I started getting this error trying to do most CLI commands and trying "tethys manage start".

Exception in thread django-main-thread:
Traceback (most recent call last):
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/core/management/__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/utils/log.py", line 70, in configure_logging
logging_config_func = import_string(logging_config)
File "/home/ezra/tethys/miniconda/envs/tethys/lib/python3.7/site-packages/django/utils/module_loading.py", line 13, in import_string
module_path, class_name = dotted_path.rsplit('.', 1)
AttributeError: 'dict' object has no attribute 'rsplit'

Any ideas on fixing this?

Scott Christensen

unread,
Sep 7, 2020, 2:05:28 PM9/7/20
to ezra.j.rice, Tethys Platform
Ezra, 

I'm guessing this has to do with the logging in the portal_config yaml file. I made some changes for this release, so take a look at the new docs. It's possible that I broke something. I'm particularly interested in this line: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
 

--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tethysplatform/1566aff5-8e16-4ca1-adcf-df8d6a4cb2a7n%40googlegroups.com.

ezra.j.rice

unread,
Sep 7, 2020, 4:40:14 PM9/7/20
to Tethys Platform
Oh thank goodness that's all it was! Thank you so much for replying Scott! You are a lifesaver. To be clear for anybody else who has the same issue, Tethys 3.0 used this format for logging in portal_config.yml:
settings:
  ...
  LOGGING_CONFIG:
    TETHYS_LOGGING:
      handlers:
        - console_verbose
      level: INFO
    TETHYS_APPS_LOGGING:
      handlers:
        - console_verbose
      level: INFO
    LOGGING_FORMATTERS: {}
    LOGGING_HANDLERS: {}
    LOGGERS: {}

Tethys 3.1 uses this new format for logging in portal_config.yml (shown with default values):
settings:
  ...
  LOGGING:
    formatters: {}
    handlers: {}
    loggers:
      django:
        handlers:
          - 'console_simple'
        level: 'WARNING'
      tethys:
        handlers:
          - 'console_verbose'
        level: 'INFO'
      tethys.apps:
        handlers:
          - 'console_verbose'
        level: 'INFO'
Reply all
Reply to author
Forward
0 new messages