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

DjangoJob matching query does not exist #26

Closed
gaurav386i opened this issue Jun 13, 2018 · 2 comments
Closed

DjangoJob matching query does not exist #26

gaurav386i opened this issue Jun 13, 2018 · 2 comments
Labels

Comments

@gaurav386i
Copy link

gaurav386i commented Jun 13, 2018

hi I am changing previous issue content as I solved that issue in my project but after solving that issue I am encountering other issue with my project please provide resolution if possible.

Internal Server Error: /jobs/
Traceback (most recent call last):
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/rest_framework/views.py", line 483, in dispatch
response = self.handle_exception(exc)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/rest_framework/views.py", line 443, in handle_exception
self.raise_uncaught_exception(exc)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/rest_framework/views.py", line 480, in dispatch
response = handler(request, *args, **kwargs)
File "/Users/gauravyadav/Python/env4/Scheduler3/distribute_jobs/views.py", line 298, in post
scheduler.start()
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/apscheduler/schedulers/blocking.py", line 19, in start
self._main_loop()
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/apscheduler/schedulers/blocking.py", line 30, in _main_loop
wait_seconds = self._process_jobs()
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/apscheduler/schedulers/base.py", line 987, in _process_jobs
jobstore_next_run_time = jobstore.get_next_run_time()
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django_apscheduler/jobstores.py", line 29, in inner
return func(*a, **k)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django_apscheduler/jobstores.py", line 79, in get_next_run_time
return deserialize_dt(DjangoJob.objects.filter(next_run_time__isnull=False).earliest('next_run_time').next_run_time)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/db/models/query.py", line 597, in earliest
return self._earliest_or_latest(*fields, field_name=field_name)
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/db/models/query.py", line 594, in _earliest_or_latest
return obj.get()
File "/Users/gauravyadav/Python/env4/lib/python3.6/site-packages/django/db/models/query.py", line 403, in get
self.model._meta.object_name
django_apscheduler.models.DoesNotExist: DjangoJob matching query does not exist.
[04/Jul/2018 12:19:05] "POST /jobs/ HTTP/1.1" 500 120459

@gaurav386i gaurav386i changed the title RuntimeWarning: Got OperationalError: no such table: django_apscheduler_djangojob. DjangoJob matching query does not exist Jul 4, 2018
@hhyo
Copy link

hhyo commented Jul 10, 2018

same case

Django==2.0.6
django-apscheduler==0.2.11

Exception in thread APScheduler:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/apscheduler/schedulers/blocking.py", line 30, in _main_loop
    wait_seconds = self._process_jobs()
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/apscheduler/schedulers/base.py", line 987, in _process_jobs
    jobstore_next_run_time = jobstore.get_next_run_time()
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/django_apscheduler/jobstores.py", line 29, in inner
    return func(*a, **k)
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/django_apscheduler/jobstores.py", line 79, in get_next_run_time
    return deserialize_dt(DjangoJob.objects.filter(next_run_time__isnull=False).earliest('next_run_time').next_run_time)
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/django/db/models/query.py", line 597, in earliest
    return self._earliest_or_latest(*fields, field_name=field_name)
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/django/db/models/query.py", line 594, in _earliest_or_latest
    return obj.get()
  File "/Users/huanhuan/IdeaProjects/venv4archer/lib/python3.5/site-packages/django/db/models/query.py", line 403, in get
    self.model._meta.object_name
django_apscheduler.models.DoesNotExist: DjangoJob matching query does not exist.

@sallyruthstruik
Copy link
Collaborator

Fixed in 0.2.12

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

No branches or pull requests

3 participants