Netflix / dispatch-docker

Apache License 2.0
206 stars 87 forks source link

AttributeError: 'int' object has no attribute 'upper' #143

Closed cowjen01 closed 2 years ago

cowjen01 commented 2 years ago

Describe the bug The installation script failed after executing Creating dispatch_web_run ... done.

Do you want to load example data (WARNING: this will remove all existing database data) (y/N)?
Initializing the database
Creating dispatch_core_1 ... done
Creating dispatch_web_run ... done
Traceback (most recent call last):
  File "/usr/local/bin/dispatch", line 8, in <module>
    sys.exit(entrypoint())
  File "/usr/local/lib/python3.9/site-packages/dispatch/cli.py", line 794, in entrypoint
    dispatch_cli()
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1654, in invoke
    super().invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/dispatch/cli.py", line 23, in dispatch_cli
    configure_logging()
  File "/usr/local/lib/python3.9/site-packages/dispatch/logging.py", line 6, in configure_logging
    level = LOG_LEVEL.upper()
AttributeError: 'int' object has no attribute 'upper'
ERROR: 1
Cleaning up...

To Reproduce Steps to reproduce the behavior:

  1. Go to repository
  2. Run installation script
  3. See error

Desktop (please complete the following information):

mvilanova commented 2 years ago

What's the value of LOG_LEVEL in your .env file? The error tells me it's an integer and not a string.

cowjen01 commented 2 years ago

I did not specify any .env file. I just pulled the repository and run install.sh script.

mvilanova commented 2 years ago

Ok, can you set it to INFO, WARN, ERROR, or DEBUG and try again? I'm working on improving the logging.py module to prevent issues like this in the future.

cowjen01 commented 2 years ago

If I specify the LOG_LEVEL parameter then it works out fine.