docs
                                
                                 docs copied to clipboard
                                
                                    docs copied to clipboard
                            
                            
                            
                        TypeError: echo() got an unexpected keyword argument 'fg'
I'm getting back to building the docs to implement some edits on other Issues. It has been a very long time :) (I think I updated from June 2020).
Some environment background:
- I run MacOS Monterey 12.3.1
- Mostly install tools with brew. They are all up-to-date.
- I run zsh, so maybe pipenv is looking for something that's not available? I tried run inbashbut same issue.
Running into this error/trace when I try to run pipenv install (following these directions).  Any suggestions?
$ pipenv install
Installing dependencies from Pipfile.lock (eb74cc)...
Traceback (most recent call last):
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/cli/options.py", line 56, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/cli/command.py", line 222, in install
    do_install(
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/core.py", line 2092, in do_install
    do_init(
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/core.py", line 1336, in do_init
    do_install_dependencies(
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/core.py", line 871, in do_install_dependencies
    batch_install(
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/core.py", line 729, in batch_install
    deps_to_install = [
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/core.py", line 730, in <listcomp>
    dep for dep in deps_to_install if not project.environment.is_satisfied(dep)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/project.py", line 319, in environment
    self._environment = self.get_environment(allow_global=allow_global)
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/project.py", line 299, in get_environment
    environment = Environment(
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/environment.py", line 70, in __init__
    self._base_paths = self.get_paths()
  File "/usr/local/Cellar/pipenv/2022.5.2/libexec/lib/python3.10/site-packages/pipenv/environment.py", line 413, in get_paths
    click.echo(f"Failed to load paths: {c.stderr}", fg="yellow")
TypeError: echo() got an unexpected keyword argument 'fg'
Thanks, @sadohert. The docs team is also using Macs, and we mostly install tools via brew, including brew install python.
Setting up a docs environment typically requires me to run the following commands in order:
- brew install python
- pipenv -rm
- pipenv install
Perhaps give this a try? It sounds like the docs README may be a bit out of date.
I did some searching around to figure out what the problem was.  I don't have concrete links, but I think something in the click library that is used by pipenv is counting on a deprecated parameter for setting the foreground colour fg.
To work around this I setup a virtualenv environment, which used python3.9, and with this activated I was able install pipenv within the environment, and get past the pipenv install command.... we should maybe add this as a troubleshooting bullet on the README
@sadohert - Does this continue to be an issue you're facing when building the documentation? Or can we close this issue?
I'm not affected now that I use a virtualenv to control versions....might be worth a quick mention/note on the readme