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

ImportError: cannot import name 'CronSlices' from 'crontab' #66

Open
hopewise opened this issue Sep 4, 2020 · 3 comments
Open

ImportError: cannot import name 'CronSlices' from 'crontab' #66

hopewise opened this issue Sep 4, 2020 · 3 comments

Comments

@hopewise
Copy link

hopewise commented Sep 4, 2020

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?

@nick-hunter
Copy link

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

@securestep9
Copy link

Getting the same error, looks like the requirements.txt are not included in the PyPi package?

@nick-hunter
Copy link

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.

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

3 participants