ImportError: cannot import name 'CronSlices' from 'crontab'
I've just installed detect-secrets-server on Ubuntu 20.04
but, when I try to add a local repo, I get this error:
detect-secrets-server add /home/samir/projects/website --local
Traceback (most recent call last):
File "/usr/local/bin/detect-secrets-server", line 5, in <module>
from detect_secrets_server.__main__ import main
File "/home/samir/.local/lib/python3.8/site-packages/detect_secrets_server/__main__.py", line 6, in <module>
from detect_secrets_server.core.usage.parser import ServerParserBuilder
File "/home/samir/.local/lib/python3.8/site-packages/detect_secrets_server/core/usage/parser.py", line 6, in <module>
from .add import AddOptions
File "/home/samir/.local/lib/python3.8/site-packages/detect_secrets_server/core/usage/add.py", line 4, in <module>
from crontab import CronSlices
ImportError: cannot import name 'CronSlices' from 'crontab' (/usr/local/lib/python3.8/dist-packages/crontab/__init__.py)
any idea?
Just ran into this same issue. Not sure if you've figured it out, but for anyone else who sees this, you probably have crontab installed instead of python-crontab
Getting the same error, looks like the requirements.txt are not included in the PyPi package?
If you run pip install detect-secrets-server then python-crontab will not be installed. If you run pip install detect-secrets-server[cron] then everything should be fine. While the latter command is in the install instructions, I think python-crontab should just be included by default to reduce confusion.