#5478 closed defect (invalid)
jinja2 - 'mediagoblin.db.models.MediaEntry object' has no attribute 'get_uploader'
Reported by: | anongoblin | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
Steps taken:
Environment:
Trace:
Error - <class 'jinja2.exceptions.UndefinedError'>: 'mediagoblin.db.models.MediaEntry object' has no attribute 'get_uploader' URL: https://biblioteca.partidopirata.org/u/pirata/m/o-principio-do-estado/ File '/home/biblioteca/mediagoblin/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in __call__ app_iter = self.application(environ, sr_checker) File '/home/biblioteca/mediagoblin/mediagoblin/app.py', line 342 in __call__ return self.call_backend(environ, start_response) File '/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.11.3-py2.7.egg/werkzeug/wsgi.py', line 599 in __call__ return self.app(environ, start_response) File '/home/biblioteca/mediagoblin/mediagoblin/app.py', line 276 in call_backend return self._finish_call_backend(request, environ, start_response) File '/home/biblioteca/mediagoblin/mediagoblin/app.py', line 318 in _finish_call_backend response = controller(request) File '/home/biblioteca/mediagoblin/mediagoblin/decorators.py', line 47 in wrapper return controller(request, *args, **kwargs) File '/home/biblioteca/mediagoblin/mediagoblin/decorators.py', line 210 in wrapper return controller(request, media=media, *args, **kwargs) File '/home/biblioteca/mediagoblin/mediagoblin/decorators.py', line 170 in wrapper return controller(request, page=page, *args, **kwargs) File '/home/biblioteca/mediagoblin/mediagoblin/user_pages/views.py', line 170 in media_home context) File '/home/biblioteca/mediagoblin/mediagoblin/tools/response.py', line 36 in render_to_response render_template(request, template, context), File '/home/biblioteca/mediagoblin/mediagoblin/tools/template.py', line 144 in render_template rendered = template.render(context) File '/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/Jinja2-2.8-py2.7.egg/jinja2/environment.py', line 989 in render return self.environment.handle_exception(exc_info, True) File '/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/Jinja2-2.8-py2.7.egg/jinja2/environment.py', line 754 in handle_exception reraise(exc_type, exc_value, tb) File '/home/biblioteca/mediagoblin/mediagoblin/themes/bibliotecapirata/templates/mediagoblin/media_displays/pdf.html', line 34 in top-level template code {% if pdf_js %} File '/home/biblioteca/mediagoblin/mediagoblin/themes/bibliotecapirata/templates/mediagoblin/user_pages/media.html', line 21 in top-level template code {% from "mediagoblin/utils/pagination.html" import render_pagination %} File '/home/biblioteca/mediagoblin/mediagoblin/themes/bibliotecapirata/templates/mediagoblin/base.html', line 64 in top-level template code {% block mediagoblin_body %} File '/home/biblioteca/mediagoblin/mediagoblin/themes/bibliotecapirata/templates/mediagoblin/base.html', line 191 in block "mediagoblin_body" {% block mediagoblin_content %} File '/home/biblioteca/mediagoblin/mediagoblin/themes/bibliotecapirata/templates/mediagoblin/user_pages/media.html', line 36 in block "mediagoblin_content" {% block mediagoblin_content %} File '/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/Jinja2-2.8-py2.7.egg/jinja2/environment.py', line 408 in getattr return getattr(obj, attribute) UndefinedError: 'mediagoblin.db.models.MediaEntry object' has no attribute 'get_uploader' CGI Variables ------------- CSRF_TOKEN: u'OMMITED' DOCUMENT_ROOT: '/usr/share/nginx/html' DOCUMENT_URI: '/u/pirata/m/o-principio-do-estado/' GATEWAY_INTERFACE: 'CGI/1.1' HTTPS: 'on' HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' HTTP_ACCEPT_ENCODING: 'gzip, deflate, br' HTTP_ACCEPT_LANGUAGE: 'en-US,en;q=0.5' HTTP_CONNECTION: 'keep-alive' HTTP_COOKIE: 'mediagoblin_csrftoken=OMMITED; mediagoblin_csrftoken=OMMITED; MGSession=OMMITED' HTTP_HOST: 'biblioteca.partidopirata.org' HTTP_REFERER: 'https://biblioteca.partidopirata.org/u/pirata/' HTTP_UPGRADE_INSECURE_REQUESTS: '1' HTTP_USER_AGENT: 'OMMITED' PATH_INFO: '/u/pirata/m/o-principio-do-estado/' REDIRECT_STATUS: '200' REMOTE_ADDR: 'OMMITED' REMOTE_PORT: 'OMMITED' REQUEST_METHOD: 'GET' REQUEST_URI: '/u/pirata/m/o-principio-do-estado/' SCRIPT_FILENAME: '/usr/share/nginx/html/u/pirata/m/o-principio-do-estado/' SERVER_ADDR: '5.135.182.223' SERVER_NAME: 'biblioteca.partidopirata.org' SERVER_PORT: '443' SERVER_PROTOCOL: 'HTTP/1.1' SERVER_SOFTWARE: 'nginx/1.6.2' WSGI Variables -------------- application: <mediagoblin.app.MediaGoblinApp object at 0x666f44dab610> paste.throw_errors: True werkzeug.request: <Request 'https://biblioteca.partidopirata.org/u/pirata/m/o-principio-do-estado/' [GET]> wsgi process: 'Multiprocess' ------------------------------------------------------------ Traceback (most recent call last): File "/home/biblioteca/mediagoblin/bin/paster", line 9, in <module> load_entry_point('PasteScript', 'console_scripts', 'paster')() File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/command.py", line 102, in run invoke(command, command_name, options, args[1:]) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/command.py", line 141, in invoke exit_code = runner.run(args) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/command.py", line 236, in run result = self.command() File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/serve.py", line 319, in command serve() File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/serve.py", line 303, in serve server(app) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 189, in server_wrapper **context.local_conf) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/util.py", line 55, in fix_call val = callable(*args, **kw) File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/paste_factory.py", line 154, in run_fcgi_fork File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_fork.py", line 140, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 135, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 328, in _spawnChild File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 406, in _child File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 669, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 705, in process_input File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 805, in _do_params File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 789, in _start_request File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 592, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 603, in _flush File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 336, in close File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 720, in writeRecord File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 530, in write File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 507, in _sendall socket.error: [Errno 104] Connection reset by peer Traceback (most recent call last): File "/home/biblioteca/mediagoblin/bin/paster", line 9, in <module> load_entry_point('PasteScript', 'console_scripts', 'paster')() File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/command.py", line 102, in run invoke(command, command_name, options, args[1:]) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/command.py", line 141, in invoke exit_code = runner.run(args) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/command.py", line 236, in run result = self.command() File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/serve.py", line 319, in command serve() File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteScript-2.0.2-py2.7.egg/paste/script/serve.py", line 303, in serve server(app) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 189, in server_wrapper **context.local_conf) File "/home/biblioteca/mediagoblin/lib/python2.7/site-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/util.py", line 55, in fix_call val = callable(*args, **kw) File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/paste_factory.py", line 154, in run_fcgi_fork File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_fork.py", line 140, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 135, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 328, in _spawnChild File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/preforkserver.py", line 406, in _child File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 669, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 705, in process_input File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 805, in _do_params File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 789, in _start_request File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 592, in run File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 602, in _flush File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 336, in close File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 720, in writeRecord File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 530, in write File "/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/flup-1.0.3.dev_20110405-py2.7.egg/flup/server/fcgi_base.py", line 507, in _sendall socket.error: [Errno 104] Connection reset by peer /home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/SQLAlchemy-0.8.7-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py:471: SAWarning: Unicode type received non-unicode bind param value.
Result:
Site is unusable because every time someone wants to actually open a file, there is this error.
This website does not allow registration, the sole user and its password is displayed at the site's front page.
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Hi there! Thanks very much for taking the time to post an issue.
If I understand correctly, the error is occurring only when a third-party theme is enabled. It is likely that this theme isn't up-to-date with the "stable" branch of GNU MediaGoblin. You're two options would be to run the MediaGoblin version that is supported by the theme, or to modify the theme to run on the "stable" branch.
Since this is third-party theme that is not part of MediaGoblin, I'll close this issue for now. Please feel free to re-open the issue if I've missed something.
comment:3 by , 7 years ago
Despite I'm using the vanilla airy theme, media stopped uploading, everything got stuck in the media processing panel. You can see it live here: https://biblioteca.partidopirata.org/u/pirata/panel/
The password for 'pirata' user is 'naosouagente'.
When I do a
./bin/gmg dbupdate
I still get the floowing error:
/home/biblioteca/mediagoblin/local/lib/python2.7/site-packages/SQLAlchemy-0.8.7-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py:471: SAWarning: Unicode type received non-unicode bind param value.
comment:4 by , 7 years ago
Thanks for the update, and sorry for the slow response.
That SAWarning: Unicode type...
message is actually just a warning, so may not be causing any problems.
I tried uploading a test image and a test PDF to your site and they seem to be working, so I guess you were able to resolve the issue?
(For what it's worth, you might want to add your email to the CC field when using this issue tracker so you get notifications.)
I've changed the theme to airy and it resolved the issue.
The theme in use (bibliotecapirata), is actually a fork from airy and the source code is available in the following places:
Will compare the current airy theme with that one and figure out where is the error.