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

Unable to add crawl from crawls list #705

Open
antrikss opened this issue Oct 11, 2015 · 3 comments
Open

Unable to add crawl from crawls list #705

antrikss opened this issue Oct 11, 2015 · 3 comments

Comments

@antrikss
Copy link

If we try to add crawls from the crawl list (http://localhost:8000/projects/sample/crawls/) then it fails with the following traceback.

Environment:


Request Method: POST
Request URL: http://localhost:8000/projects/sample/add_crawl/

Django Version: 1.7.3
Python Version: 2.7.8
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'crispy_forms',
 'base',
 'task_manager',
 'rest_framework',
 'apps.crawl_space',
 'debug_toolbar')
Installed Middleware:
(u'debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/views/generic/base.py" in view
  69.             return self.dispatch(request, *args, **kwargs)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  87.         return handler(request, *args, **kwargs)
File "/Users/Antrromet/Documents/USC/Fall2015/IR/memex-explorer/source/apps/crawl_space/views.py" in post
  105.             return super(AddCrawlView, self).post(request, *args, **kwargs)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  207.         return super(BaseCreateView, self).post(request, *args, **kwargs)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  173.             return self.form_valid(form)
File "/Users/Antrromet/Documents/USC/Fall2015/IR/memex-explorer/source/apps/crawl_space/views.py" in form_valid
  109.         return super(AddCrawlView, self).form_valid(form)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/contrib/messages/views.py" in form_valid
  11.         response = super(SuccessMessageMixin, self).form_valid(form)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/views/generic/edit.py" in form_valid
  149.         self.object = form.save()
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/forms/models.py" in save
  455.                              construct=False)
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/forms/models.py" in save_instance
  103.         instance.save()
File "/Users/Antrromet/Documents/USC/Fall2015/IR/memex-explorer/source/apps/crawl_space/models.py" in save
  185.                 self.seeds_list = SimpleUploadedFile("seeds", bytes(self.seeds_object.to_file_string()))
File "/Users/Antrromet/anaconda/envs/memex/lib/python2.7/site-packages/django/db/models/fields/related.py" in __get__
  578.                 "%s has no %s." % (self.field.model.__name__, self.field.name)

Exception Type: RelatedObjectDoesNotExist at /projects/sample/add_crawl/
Exception Value: Crawl has no seeds_object.

screen shot 2015-10-10 at 10 57 14 pm

@brittainhard
Copy link
Contributor

So you stumbled across some old code. The add crawl page is deprecated and is about to be removed. Adding crawls should be done from the project page only.

We still have some legacy code that we are trying to get rid of (probably this week sometime).

How did you access the add_crawl page? Through the sidebar?

@antrromet
Copy link

Yes. When you click on Crawls from the side bar, then it gives you the list of all crawls. And there at the bottom right, there is a button Add Crawl that gives this problem.
The url for the same is http://localhost:8000/projects/sample/crawls/
screen shot 2015-10-12 at 11 36 40 am

@brittainhard
Copy link
Contributor

Thanks. I'll fix this issue in a PR soon. For now i'm going to temporarily disable that page.

All crawls should be added from the project page.

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