Opened 13 years ago

Last modified 8 years ago

#382 in_progress defect

If video support is turned off after videos have been uploaded, videos are still shown and cause an error when clicked — at Version 3

Reported by: Clint Byrum Owned by:
Priority: minor Milestone:
Component: programming Keywords: bitesized decision
Cc: ben@… Parent Tickets:

Description (last modified by Christopher Allan Webber)

Test case:

Install mediagoblin with video turned on in
mediagoblin_local.ini:

media_types = mediagoblin.media\_types.image,
mediagoblin.media_types.video

Upload a video

Change mediagoblin_local.ini to have

media_types = mediagoblin.media_types.image,

Restart paster / lazyserver / celery / etc.

The video will be displayed, click it, you will get an error:

Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: Error -
<class 'mediagoblin.media_types.FileTypeNotSupported'>:
MediaManager not in enabled types. Check media_types in config?
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: URL:
`http://ec2-107-20-7-95.compute-1.amazonaws.com/u/s22/m/some-video/ <http://ec2-107-20-7-95.compute-1.amazonaws.com/u/s22/m/some-video/>`_
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
'/opt/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py',
line 144 in *call*
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: app_iter
= self.application(environ, sr_checker)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
'/opt/mediagoblin/local/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/urlmap.py',
line 203 in *call*
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: return
app(environ, start_response)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
'/opt/mediagoblin/local/lib/python2.7/site-packages/Beaker-1.6.2-py2.7.egg/beaker/middleware.py',
line 155 in *call*
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: return
self.wrap_app(environ, session_start_response)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
'/opt/mediagoblin/mediagoblin/app.py', line 176 in *call*
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: response =
controller(request)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
'/opt/mediagoblin/mediagoblin/decorators.py', line 117 in wrapper
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: return
controller(request, media=media, **args,**kwargs)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
'/opt/mediagoblin/mediagoblin/decorators.py', line 83 in wrapper
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: return
controller(request, page=page,
*args, **kwargs)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File '/opt/mediagoblin/mediagoblin/user_pages/views.py', line 125 in media_homeJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: media_template_name = get_media_manager(media.media_type)['display_template']Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File '/opt/mediagoblin/mediagoblin/media_types/**init**.py', line 65 in get_media_managerJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: "MediaManager not in enabled types. Check media_types in config?")Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: FileTypeNotSupported: MediaManager not in enabled types. Check media_types in config?Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: CGI VariablesJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: -------------Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: CSRF_TOKEN: u'2991456393146439023'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: DOCUMENT_ROOT: '/etc/nginx/html'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: DOCUMENT_URI: '/u/s22/m/some-video/'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: GATEWAY_INTERFACE: 'CGI/1.1'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,**/*;q=0.8'
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:
HTTP_ACCEPT_CHARSET:
'ISO-8859-1,utf-8;q=0.7,*;q=0.3'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_ACCEPT_ENCODING: 'gzip,deflate,sdch'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_ACCEPT_LANGUAGE: 'en-US,en;q=0.8'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_CONNECTION: 'keep-alive'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_COOKIE: 'mediagoblin_csrftoken=2991456393146439023; mediagoblin_csrftoken=2991456393146439023; mediagoblin_csrftoken=2991456393146439023'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_HOST: 'ec2-107-20-7-95.compute-1.amazonaws.com'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_REFERER: 'http://ec2-107-20-7-95.compute-1.amazonaws.com/'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: HTTP_USER_AGENT: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: PATH_INFO: '/u/s22/m/some-video/'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: REDIRECT_STATUS: '200'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: REMOTE_ADDR: '76.94.215.209'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: REMOTE_PORT: '41472'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: REQUEST_METHOD: 'GET'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: REQUEST_URI: '/u/s22/m/some-video/'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: SCRIPT_FILENAME: '/etc/nginx/html/u/s22/m/some-video/'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: SERVER_ADDR: '10.215.83.225'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: SERVER_PORT: '80'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: SERVER_PROTOCOL: 'HTTP/1.1'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: SERVER_SOFTWARE: 'nginx/1.0.5'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: WSGI VariablesJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: --------------Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: application: {(None, '/mgoblin_media'): <StaticURLParser '/opt/mediagoblin/user_dev/media/public'>, (None, '/mgoblin_static'): <StaticURLParser '/opt/mediagoblin/mediagoblin/static'>, (None, ''): <beaker.middleware.SessionMiddleware object at 0xa5bf54c>}Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0xa5bf54c>>Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: beaker.session: {'_accessed_time': 1327450884.558526, '_creation_time': 1327450884.558526}Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: paste.throw_errors: TrueJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: webob._parsed_cookies: ({'mediagoblin_csrftoken': '2991456393146439023'}, 'mediagoblin_csrftoken=2991456393146439023; mediagoblin_csrftoken=2991456393146439023; mediagoblin_csrftoken=2991456393146439023')Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: webob._parsed_query_vars: (GET, '')Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: webob.adhoc_attrs: {'locale': 'en_US', 'staticdirect': <mediagoblin.staticdirect.RemoteStaticDirect object at 0xa5bf68c>, 'app': <mediagoblin.app.MediaGoblinApp object at 0xa55dbcc>, 'db': Database(Connection('localhost', 27017), u'mediagoblin'), 'urlgen': <routes.util.URLGenerator object at 0xa5ba14c>, 'start_response': <function session_start_response at 0xa6221ec>, 'session': {'_accessed_time': 1327450884.558526, '_creation_time': 1327450884.558526}, 'full_path': '/u/s22/m/some-video/', 'template_env': <jinja2.environment.Environment object at 0xa623eec>, 'matchdict': {'media': u'some-video', 'controller': u'mediagoblin.user_pages.views:media_home', 'user': u's22'}, 'user': None}Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: wsgi process: 'Multiprocess'Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: ------------------------------------------------------------Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: Starting server in PID 24618.Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: Traceback (most recent call last):Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/bin/paster", line 9, in Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in runJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: invoke(command, command_name, options, args[1:])Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invokeJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: exit_code = runner.run(args)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in runJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: result = self.command()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 311, in commandJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: serve()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 295, in serveJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: server(app)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 189, in server_wrapperJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:**context.local_conf)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/opt/mediagoblin/local/lib/python2.7/site-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/util.py", line 56, in fix_callJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: val = callable(*args,
**kw)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/paste_factory.py", line 94, in run_fcgi_forkJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: s.run()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_fork.py", line 133, in runJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: ret = PreforkServer.run(self, sock)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/preforkserver.py", line 123, in runJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: if not self._spawnChild(sock): breakJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/preforkserver.py", line 296, in _spawnChildJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._child(sock, parent)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/preforkserver.py", line 374, in _childJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._jobClass(clientSock, addr,*self._jobArgs).run()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 646, in runJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self.process_input()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 682, in process_inputJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._do_params(rec)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 781, in _do_paramsJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._start_request(req)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 765, in _start_requestJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: req.run()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 571, in runJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._flush()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 582, in _flushJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self.stderr.close()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 334, in closeJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self.flush()Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 328, in flushJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._write(data)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 299, in _writeJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._conn.writeRecord(rec)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 697, in writeRecordJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: rec.write(self._sock)Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 534, in writeJan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: self._sendall(sock, '00'*self.paddingLength)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: File
"/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 507,
in _sendall
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi: sent =
sock.send(data)
Jan 25 00:21:24 domU-12-31-39-0C-50-13 mediagoblin.fcgi:
socket.error: [Errno 104] Connection reset by peer

This was as of this commit:

commit c47a03b909ecd97cab5b144d0cab007b62b92a90
Author: Elrond
<`elrond+mediagoblin.org@samba-tng.org <mailto:elrond+mediagoblin.org@samba-tng.org>`_>
Date: Wed Jan 4 22:13:19 2012 +0100

    Proper url_to_{prev,next} for SQL
    
    Uses complete sqlalchemy syntax now.

Grabbed via:

    git clone git://gitorious.org/mediagoblin/mediagoblin.git

Change History (4)

comment:1 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/745 .

comment:2 by Elrond, 12 years ago

Component: programming
Description: modified (diff)
Keywords: bitesized decision added

bitesized task: Try to reproduce this on current master and see what is happening. We need a current stack trace.

Not so simple task: We need to decide what should happen in the general case anyway: Should we just not show "not any more supported" media? Or a striped version? I really don't know.

(I don't know, why trac thinks I modified the description. I did not intend to.)

comment:3 by Christopher Allan Webber, 12 years ago

Description: modified (diff)

by Ben Sturmfels, 11 years ago

Updated traceback running on development server.

Note: See TracTickets for help on using tickets.