Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package toml is not being recognized as a requirement for pylama #236

Open
vinibiavatti1 opened this issue Jan 31, 2023 · 1 comment
Open

Comments

@vinibiavatti1
Copy link

Error
The library is not reading the project's pyproject.toml file. Even running the command pylama -o pyproject.toml, the below error occurs: (thanks @alorence for the stacktrace).

File "main.py", line 100, in shell
    options = parse_options(args)
  File "main.py", line 203, in parse_options
    cfg = get_config(options.options, rootdir=rootdir)
  File "main.py", line 272, in get_config
    return get_config_toml(cfg_path)
  File "main.py", line 290, in get_config_toml
    config = config_toml.Namespace()
NameError: name 'config_toml' is not defined. Did you mean: 'get_config_toml'?

Cause
It happens because the module config_toml cannot be imported at config module, due to an ImportError raised when the module toml tried to be imported. For some reason, when installing the library pip install pylama, the toml library is not being recognized as a required package for the project.

Fix (work-arround)
We can install toml library manually to fix the problem using the command pip install toml.

@vinibiavatti1
Copy link
Author

Looking at the documentation, I saw that it is proposital to consider toml library as a optional library. To install the library, the documentation suggests to perform pip install pylama[toml]. The issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant