Trying to import a channel when Internet isn't connected fails with a 500
See original GitHub issueSummary
I believe we used to show a graceful error message (validation-style) when you tried to import content from the internet and you weren’t connected. In the latest version, it fails rather ungracefully with a 500 (and no chance to retry).
System information
- Version: latest 0.6
- Operating system: Ubuntu
- Browser: Chrome
Traceback or relevant snippet from server.log or browser console
ERROR 2017-09-21 14:33:02,344 base Internal Server Error: /api/tasks/startremoteimport/
Traceback (most recent call last):
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/rest_framework/viewsets.py", line 87, in view
return self.dispatch(request, *args, **kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/rest_framework/views.py", line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/tasks/api.py", line 102, in startremoteimport
get_content_database_file_url(channel_id)).status_code
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/requests/api.py", line 97, in head
return request('head', url, **kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/requests/api.py", line 57, in request
return session.request(method=method, url=url, **kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/requests/sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "/home/jamalex/.pex/install/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl.25703e51e5e72ed9c2589c2d2478ae8b2725774e/kolibri-0.6.dev020170921163803_git-py2.py3-none-any.whl/kolibri/dist/requests/adapters.py", line 467, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='contentworkshop.learningequality.org', port=443): Max retries exceeded with url: /content/databases/17d7606476bd52f4ac94bd76b6f3aa8c.sqlite3 (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7efdf40f9790>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
How to reproduce
- Go to content import page
- Disconnect from internet
- Try to import channel from internet
Screenshots
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to Fix the 500 Internal Server Error in WordPress
If you want to continue troubleshooting on your own, then see our ultimate WordPress troubleshooting guide for beginners.
Read more >500 Internal Server Error on Channel List page - Google Support
500 Internal Server Error on Channel List page · 1. Sign in to https://myaccount.google.com/brandaccounts · 2. Click the Brand Account name · 3....
Read more >The remote server returned an error: (500) Internal Server Error.
The remote server returned an error: (500) Internal Server Error. Description: An unhandled exception occurred during the execution of the current web request....
Read more >Wi-Fi freqently loses connection and doesn't reestablish it ...
scanning, but shows that it tried to connect and failed and to "tap again" to retry. I tap again and it comes back....
Read more >Troubleshoot connection issues | Slack
You'll see an error message in the browser that you're using to access Slack. Connectivity failure. The issue. When the Slack desktop app...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just learned the hard way that having centralized download functionality (that extends into becoming a kind of download manager) was necessary in KA Lite. It has a
download_file
function which is now core of (hopefully) all client-side download tasks.Being worried about this, I went straight to the Kolibri code to check out what was done here, and I found
kolibri.utils.transfer
and some really nice patterns in theimportcontent
management command. And there’s nothing left to desire from KA Lite lessons – so just wanted to say: Great work on designing this!!!confirmed - this works pretty well now whether the network goes down during or before a transfer is initiated