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

InvalidFilename error when submitting Website to scrape #888

Open
gunnar7680 opened this issue Jul 14, 2019 · 0 comments
Open

InvalidFilename error when submitting Website to scrape #888

gunnar7680 opened this issue Jul 14, 2019 · 0 comments

Comments

@gunnar7680
Copy link

Internal Server Error: /api/projects
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/rest_framework/viewsets.py", line 95, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3.5/contextlib.py", line 30, in inner
return func(*args, **kwds)
File "/app/portia_server/portia_api/resources/route.py", line 72, in dispatch
return super(JsonApiRoute, self).dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py", line 494, in dispatch
response = self.handle_exception(exc)
File "/app/portia_server/portia_api/resources/route.py", line 75, in handle_exception
response = super(JsonApiRoute, self).handle_exception(exc)
File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py", line 454, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py", line 491, in dispatch
response = handler(request, *args, **kwargs)
File "/app/portia_server/portia_api/resources/projects.py", line 113, in create
if not self.storage.is_valid_filename(name) or '.' in name:
File "/usr/local/lib/python3.5/dist-packages/django/utils/functional.py", line 80, in get
res = instance.dict[self.name] = self.func(instance)
File "/app/portia_server/portia_api/resources/route.py", line 67, in storage
self.kwargs['project_id'], author=self.user)
File "/app/portia_server/storage/init.py", line 22, in create_project_storage
return storage_class(project_id, author=author)
File "/app/portia_server/storage/backends.py", line 131, in init
self.init_project()
File "/app/portia_server/storage/backends.py", line 59, in init_project
self.validate_filename(self.name)
File "/app/portia_server/storage/backends.py", line 110, in validate_filename
u"The string '{}' is not a valid filename.".format(s))
storage.backends.InvalidFilename: The string 'https://www.nbcnews.com/news/weather/barry-strengthens-hurricane-it-heads-toward-louisiana-coast-n1029541?cid=par-nbc_20190714' is not a valid filename.

@gunnar7680 gunnar7680 changed the title Internal Server Error InvalidFilename error when submitting Website to scrape Jul 14, 2019
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

1 participant