posborne / putio-sync

Python daemon that automatically downloads files from put.io
MIT License
29 stars 12 forks source link

Internal Server Error on starting a download #20

Closed Gordin closed 8 years ago

Gordin commented 8 years ago

Starting a download opens a web browser with just

"Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

and this in the console:

Traceback (most recent call last):
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/gordin/.local/lib/python2.7/site-packages/putiosync/webif/webif.py", line 135, in _view_active
    return render_template("active.html")
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/templating.py", line 127, in render_template
    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 851, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 812, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 774, in _load_template
    cache_key = self.loader.get_source(self, name)[1]
  File "/home/gordin/.local/lib/python2.7/site-packages/flask/templating.py", line 64, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: active.html

The download still starts and seems to work fine.

posborne commented 8 years ago

I'm continuously running things locally but with the code checked out. I'm guessing this is a problem with certain files not being packaged up properly when they are uploaded to pypi. I'll take a look.

posborne commented 8 years ago

Hey @Gordin. Please go ahead and test the change now that it is published. You can do that by executing the following and re-running...

pip install --upgrade putiosync
Gordin commented 8 years ago

@posborne Seems to work now :+1: