You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the fmn development environment, inside ~/.fedmsg.d/:
(fmn) [vagrant@fmn-dev .fedmsg.d]$ python -c 'from fedmsg.config import load_config'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/fedmsg/__init__.py", line 25, in <module>
import fedmsg.core
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/fedmsg/core.py", line 35, in <module>
import fedmsg.encoding
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/fedmsg/encoding/__init__.py", line 46, in <module>
import sqlalchemy
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/__init__.py", line 9, in <module>
from .sql import (
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/sql/__init__.py", line 98, in <module>
__go(locals())
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/sql/__init__.py", line 96, in __go
from . import naming
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/sql/naming.py", line 15, in <module>
from .. import event, events
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/events.py", line 11, in <module>
from .pool import Pool
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/pool.py", line 24, in <module>
from . import exc, log, event, interfaces, util
File "/home/vagrant/.virtualenvs/fmn/lib/python2.7/site-packages/sqlalchemy/log.py", line 27, in <module>
rootlogger = logging.getLogger('sqlalchemy')
AttributeError: 'module' object has no attribute 'getLogger'
I would expect this to not crash, especially given it's just an import.
The text was updated successfully, but these errors were encountered:
The fedmsg-base package contains /etc/fedmsg.d/logging.py; I assume that your ~/.fedmsg.d/also contains logging.py. The current directory is on the search path; that's just how Python works. If you want to fix it, you're going to have to break all configs and rename that file to something that doesn't conflict with the standard library.
Thanks for looking into the root cause of this, I was in a hurry when I filed it and never got around to investigating.
Personally I really dislike the current configuration approach. I think it's way more complicated than it should be and I really want to redo it. Things I'd like include:
A non-Python configuration format. Options include TOML, YAML, or INI. I personally would prefer TOML.
Simplify where the configuration is loaded from and make it very clear where configuration was picked up from. Support loading from /etc/fedmsg/config.toml, ~/.config/fedmsg/config.toml, or from a file specified in the command line interface.
I'm not crazy about layering configs on top of configs on top of configs so I'd like to get rid of that, too.
Very clearly document all the configuration settings.
A nice config module that lazy-loads the configuration as a singleton object that other modules just import.
From the fmn development environment, inside ~/.fedmsg.d/:
I would expect this to not crash, especially given it's just an import.
The text was updated successfully, but these errors were encountered: