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 Initial Version

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

Description

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 (0)

Note: See TracTickets for help on using tickets.