joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.54k stars 36 forks source link

ValueError: Unable to configure handler 'log_tab' #69

Closed twrightsman closed 1 year ago

twrightsman commented 1 year ago

I tried to test the latest dev commit (https://github.com/joouha/euporie/commit/d94d467d972f2a318aa890ef552a23150e2ce988) for euporie but ran into an error:

$ euporie-notebook test.ipynb
15:28:01 CRITICAL Uncaught exception                                                                                                                                           euporie.core.log.handle_exception:41                  Traceback (most recent call last):
                    File "/usr/lib/python3.11/logging/config.py", line 562, in configure
                      handler = self.configure_handler(handlers[name])
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    File "/usr/lib/python3.11/logging/config.py", line 760, in configure_handler
                      result.setLevel(logging._checkLevel(level))
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
                    File "/usr/lib/python3.11/logging/__init__.py", line 207, in _checkLevel
                      raise ValueError("Unknown level: %r" % level)
                  ValueError: Unknown level: ''

                  The above exception was the direct cause of the following exception:

                  Traceback (most recent call last):
                    File "euporie-venv/bin/euporie-notebook", line 8, in <module>
                      sys.exit(main())
                               ^^^^^^
                    File "euporie-venv/lib/python3.11/site-packages/euporie/notebook/__main__.py", line 8, in main
                      __main__.main(__name__.split(".")[1])
                    File "euporie-venv/lib/python3.11/site-packages/euporie/core/__main__.py", line 10, in main
                      return entry.load().launch()
                             ^^^^^^^^^^^^^^^^^^^^^
                    File "euporie-venv/lib/python3.11/site-packages/euporie/core/app.py", line 520, in launch
                      cls.config.load(cls)
                    File "euporie-venv/lib/python3.11/site-packages/euporie/core/config.py", line 374, in load
                      setup_logs(self)
                    File "euporie-venv/lib/python3.11/site-packages/euporie/core/log.py", line 344, in setup_logs
                      logging.config.dictConfig(log_config)  # type: ignore
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    File "/usr/lib/python3.11/logging/config.py", line 812, in dictConfig
                      dictConfigClass(config).configure()
                    File "/usr/lib/python3.11/logging/config.py", line 569, in configure
                      raise ValueError('Unable to configure handler '
                  ValueError: Unable to configure handler 'log_tab'

I bisected the problematic commit to https://github.com/joouha/euporie/commit/ce3bd906479073d312c7e26ffe476fd4de4347e6 but haven't debugged further yet.

joouha commented 1 year ago

Thanks for reporting this.

I've just pushed a new commit which should fix this :crossed_fingers:

twrightsman commented 1 year ago

Seems to be working now, thank you!