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: No module named manage #1

Closed
xavicolomer opened this issue Jul 29, 2012 · 3 comments
Closed

ImportError: No module named manage #1

xavicolomer opened this issue Jul 29, 2012 · 3 comments
Assignees

Comments

@xavicolomer
Copy link

Although I have defined the CRONTAB_DJANGO_MANAGE_PATH variable on the settings.py

Any idea?

Traceback (most recent call last):
File "private/devcon/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/usr/local/lib/python2.7/dist-packages/django_crontab-0.3-py2.7.egg/django_crontab/management/commands/crontab.py", line 3, in
from django_crontab.app_settings import CRONTAB_EXECUTABLE, CRONJOBS,
File "/usr/local/lib/python2.7/dist-packages/django_crontab-0.3-py2.7.egg/django_crontab/app_settings.py", line 20, in
DJANGO_MANAGE_PATH = getattr(settings, 'CRONTAB_DJANGO_MANAGE_PATH', import_module(DJANGO_PROJECT_NAME + '.manage').file.replace('pyc', 'py'))
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
ImportError: No module named manage

@ghost ghost assigned kraiz Jul 29, 2012
@kraiz
Copy link
Owner

kraiz commented Jul 29, 2012

Sure, this crashes no matter whether CRONTAB_DJANGO_MANAGE_PATH is set or not, especially when using Django 1.4 where the manage.py file moved one folder up.

This should be fixed with 47e8bc8. Version 0.4 is released on pypi so just run

pip install -U django-crontab

and give it a try :)

@xavicolomer
Copy link
Author

Hi Kraiz,

That almost solved it.

Line:
*/5 * * * * /usr/bin/python /home/sites/devcon.pre.is/private/devcon/ crontab run devcon.core.cron.test # django-cronjobs for devcon

I have this problem when I try to run the command copy / paste from the crontab file:
/usr/bin/python: can't find 'main' module in '/home/sites/devcon.pre.is/private/devcon/'

@kraiz
Copy link
Owner

kraiz commented Aug 2, 2012

Seems your settings.CRONTAB_DJANGO_MANAGE_PATH doesn't include the "manage.py" at the end.
Try testing it without overwriting this setting. If it fails add "manage.py" at the end of it.

And i'm going to mention this in the documentation.

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

2 participants