Open Phil67ago opened 4 years ago
I've hit the same problem. As far as I can tell, the --config-file
command line option can't ever work: args.config_file
is a file-like object, not a string-like object, which means npath()
will always choke on it; even if you remove the call to npath, it then gets passed to the PBConfigFile
constructor, which does essentially the same thing as npath()
did.
I could not configure a specific config file.
pybombs config --config-file test.yml
It seems that option --config-file in 'pybombs config' clashes with 'pybombs --config-file'.
File "/home/foo/.local/bin/pybombs", line 6, in
from pybombs.main import main
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/main.py", line 26, in
from pybombs.commands import dispatch
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/commands/init.py", line 23, in
from .base import CommandBase, SubCommandBase, dispatch
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/commands/base.py", line 27, in
from pybombs.config_manager import config_manager
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/config_manager.py", line 707, in
config_manager = ConfigManager()
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/config_manager.py", line 320, in init
self.load(select_prefix)
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/config_manager.py", line 367, in load
self._append_cfg_from_file(npath(args.config_file))
File "/home/foo/.local/lib/python3.7/site-packages/pybombs/config_manager.py", line 44, in npath
return os.path.abspath(os.path.expanduser(os.path.normpath(path)))
File "/usr/lib64/python3.7/posixpath.py", line 340, in normpath
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper