mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] unsaved pending instance, orphan, not attached to any pa


From: Nagarjuna G
Subject: Re: [GMG-Devel] unsaved pending instance, orphan, not attached to any parent MediaEntry
Date: Sun, 8 Apr 2012 20:01:06 +0530

On Sun, Apr 8, 2012 at 7:21 PM, Christopher Allan Webber
<address@hidden> wrote:
> Nagarjuna G <address@hidden> writes:
>
>> I tested for a video, a small ogv file.  First after a while  I get
>> "Internal server error",  however I noticed the server was busy
>> transcoding the video.  After completing the transcoding, it failed
>> with the folloiwng error.
>
> After enabling new media types, you need to run:
>
>  ./bin/gmg dbupdate
>
> We should probably have it spit out a relevant error on startup if
> dbupdate needs to be run! :)

I ran dbupdate.  Now the error changed to old error:

 <class 'sqlalchemy.orm.exc.FlushError'>: Instance <VideoData at
0x3a79110> is an unsaved, pending instance and is an orphan (is not
attached to any parent 'MediaEntry' instance via that classes'
'video__media_data' attribute)

the relevant context from the log is here.

2012-04-08 14:59:12,494 INFO
[mediagoblin.media_types.video.transcoders] 100% done...
2012-04-08 14:59:12,503 INFO    [mediagoblin.media_types.video.transcoders] Done
2012-04-08 14:59:12,653 INFO
[mediagoblin.media_types.video.transcoders] Terminating MainLoop
2012-04-08 14:59:12,654 DEBUG
[mediagoblin.media_types.video.processing] Saving medium...
2012-04-08 14:59:12,658 DEBUG
[mediagoblin.media_types.video.processing] Saved medium
/home/mediagoblin/mediagoblin/lib/python2.6/site-packages/SQLAlchemy-0.6.3-py2.6.egg/sqlalchemy/engine/default.py:507:
SAWarning: Unicode type received non-unicode bind param value.
  param[key.encode(encoding)] = processors[key](compiled_params[key])
2012-04-08 14:59:13,184 INFO
[mediagoblin.media_types.video.transcoders] Video length: 34.16
2012-04-08 14:59:13,185 INFO
[mediagoblin.media_types.video.transcoders] Setting up thumbnailing
pipeline
2012-04-08 14:59:13,328 INFO
[mediagoblin.media_types.video.transcoders] Pipeline paused,
processing
2012-04-08 14:59:13,329 INFO
[mediagoblin.media_types.video.transcoders] Added buffer probe
2012-04-08 14:59:13,515 INFO
[mediagoblin.media_types.video.transcoders] Saved thumbnail
2012-04-08 14:59:13,516 INFO
[mediagoblin.media_types.video.transcoders] Shutting down
2012-04-08 14:59:13,516 INFO
[mediagoblin.media_types.video.transcoders] Halting...
2012-04-08 14:59:13,540 INFO
[mediagoblin.media_types.video.transcoders] Pipeline paused,
processing
2012-04-08 14:59:13,540 INFO
[mediagoblin.media_types.video.transcoders] Added buffer probe
2012-04-08 14:59:13,543 INFO    [mediagoblin.media_types.video.transcoders] Done
2012-04-08 14:59:13,543 DEBUG
[mediagoblin.media_types.video.processing] Saving thumbnail...
2012-04-08 14:59:13,543 DEBUG
[mediagoblin.media_types.video.processing] Saved thumbnail
2012-04-08 14:59:13,545 WARNING [mediagoblin.processing] No idea what
happened here, but it failed: FlushError("Instance <VideoData at
0x3a79110> is an unsaved, pending instance and is an orphan (is not
attached to any parent 'MediaEntry' instance via that classes'
'video__media_data' attribute)",)
Error - <class 'sqlalchemy.orm.exc.FlushError'>: Instance <VideoData
at 0x3a79110> is an unsaved, pending instance and is an orphan (is not
attached to any parent 'MediaEntry' instance via that classes'
'video__media_data' attribute)
URL: http://media.gnowledge.org/submit/
File '/usr/lib/pymodules/python2.6/paste/exceptions/errormiddleware.py',
line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/lib/pymodules/python2.6/paste/urlmap.py', line 203 in __call__
  return app(environ, start_response)
File 
'/home/mediagoblin/mediagoblin/lib/python2.6/site-packages/Beaker-1.5.4-py2.6.egg/beaker/middleware.py',
line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/home/mediagoblin/mediagoblin/mediagoblin/app.py', line 194 in __call__
  return self.call_backend(environ, start_response)
File '/home/mediagoblin/mediagoblin/mediagoblin/app.py', line 181 in
call_backend
  response = controller(request)
File '/home/mediagoblin/mediagoblin/mediagoblin/decorators.py', line
50 in new_controller_func
  return controller(request, *args, **kwargs)
File '/home/mediagoblin/mediagoblin/mediagoblin/submit/views.py', line
134 in submit_start
  mark_entry_failed(entry._id, exc)
File '/home/mediagoblin/mediagoblin/mediagoblin/processing/__init__.py',
line 99 in mark_entry_failed
  u'fail_metadata': {}})
File '/home/mediagoblin/mediagoblin/mediagoblin/db/sql/util.py', line
284 in atomic_update
  synchronize_session=False)
File 
'/home/mediagoblin/mediagoblin/lib/python2.6/site-packages/SQLAlchemy-0.6.3-py2.6.egg/sqlalchemy/orm/query.py',
line 2159 in update
  session._autoflush()
File 
'/home/mediagoblin/mediagoblin/lib/python2.6/site-packages/SQLAlchemy-0.6.3-py2.6.egg/sqlalchemy/orm/session.py',
line 877 in _autoflush
  self.flush()
File 
'/home/mediagoblin/mediagoblin/lib/python2.6/site-packages/SQLAlchemy-0.6.3-py2.6.egg/sqlalchemy/orm/session.py',
line 1346 in flush
  self._flush(objects)
File 
'/home/mediagoblin/mediagoblin/lib/python2.6/site-packages/SQLAlchemy-0.6.3-py2.6.egg/sqlalchemy/orm/session.py',
line 1409 in _flush
  mapperutil.state_str(state), path))
FlushError: Instance <VideoData at 0x3a79110> is an unsaved, pending
instance and is an orphan (is not attached to any parent 'MediaEntry'
instance via that classes' 'video__media_data' attribute)


CGI Variables
-------------
  CONTENT_TYPE: 'multipart/form-data;
boundary=----WebKitFormBoundaryP2ev8G0f9QCMVfK1'
  CSRF_TOKEN: u'11459717970219068911'
  DOCUMENT_ROOT: '/var/www/'
  GATEWAY_INTERFACE: 'CGI/1.1'
  HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'
  HTTP_ACCEPT_ENCODING: 'gzip,deflate,sdch'
  HTTP_ACCEPT_LANGUAGE: 'en-US,en;q=0.8'
  HTTP_CACHE_CONTROL: 'max-age=0'
  HTTP_CONNECTION: 'keep-alive'
  HTTP_COOKIE: 'mediagoblin_csrftoken=11459717970219068911;
mediagoblin=4ad1ef802a796b83ecf0a877fb969859;
mediagoblin_csrftoken=11459717970219068911'
  HTTP_HOST: 'media.gnowledge.org'
  HTTP_ORIGIN: 'http://media.gnowledge.org'
  HTTP_REFERER: 'http://media.gnowledge.org/submit/'
  HTTP_USER_AGENT: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11
(KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11'
  PATH: '/usr/local/bin:/usr/bin:/bin'
  PATH_INFO: '/submit/'
  PATH_TRANSLATED: '/var/www/mg.fcgi/submit/'
  REMOTE_ADDR: '158.144.32.52'
  REMOTE_PORT: '52669'
  REQUEST_METHOD: 'POST'
  REQUEST_URI: '/submit/'
  SCRIPT_FILENAME: '/var/www/mg.fcgi'
  SCRIPT_URI: 'http://media.gnowledge.org/submit/'
  SCRIPT_URL: '/submit/'
  SERVER_ADDR: '158.144.44.223'
  SERVER_ADMIN: 'address@hidden'
  SERVER_NAME: 'media.gnowledge.org'
  SERVER_PORT: '80'
  SERVER_PROTOCOL: 'HTTP/1.1'
  SERVER_SIGNATURE: '<address>Apache/2.2.16 (Debian) Server at
media.gnowledge.org Port 80</address>\n'
  SERVER_SOFTWARE: 'Apache/2.2.16 (Debian)'


WSGI Variables
--------------
  application: {(None, ''): <beaker.middleware.SessionMiddleware
object at 0x3691490>, (None, '/mgoblin_static'): <StaticURLParser
'/home/mediagoblin/mediagoblin/mediagoblin/static'>, (None,
'/mgoblin_media'): <StaticURLParser
'/home/mediagoblin/mediagoblin/user_dev/media/public'>}
  beaker.get_session: <bound method SessionMiddleware._get_session of
<beaker.middleware.SessionMiddleware object at 0x3691490>>
  beaker.session: {'_accessed_time': 1333897017.5881109, 'messages':
[], '_creation_time': 1333895502.1156459, 'user_id': u'1'}
  paste.throw_errors: True
  webob._body_file:
(<LimitedLengthFile(<flup.server.fcgi_base.InputStream object at
0x39d04d0>, maxlen=970758)>, <flup.server.fcgi_base.InputStream object
at 0x39d04d0>)
  webob._parsed_cookies: ({'mediagoblin_csrftoken':
'11459717970219068911', 'mediagoblin':
'4ad1ef802a796b83ecf0a877fb969859'},
'mediagoblin_csrftoken=11459717970219068911;
mediagoblin=4ad1ef802a796b83ecf0a877fb969859;
mediagoblin_csrftoken=11459717970219068911')
  webob._parsed_post_vars: (MultiDict([('file', FieldStorage('file',
'goblin.ogv')), ('title', 'screencast of mediagoblin'),
('description', 'a test video'), ('tags', ''), ('license',
'http://creativecommons.org/licenses/by-sa/3.0/'), ('csrf_token',
'11459717970219068911')]), <FakeCGIBody at 0x39d0e10 viewing
MultiDict([('fi...1')])>)
  webob._parsed_query_vars: (GET([]), '')
  webob.adhoc_attrs: {'locale': 'en_US', 'staticdirect':
<mediagoblin.staticdirect.RemoteStaticDirect object at 0x3687790>,
'app': <mediagoblin.app.MediaGoblinApp object at 0x1ed3110>, 'db':
<mediagoblin.db.sql.open.DatabaseMaster object at 0x3687410>,
'urlgen': <routes.util.URLGenerator object at 0x39d0850>,
'start_response': <function session_start_response at 0x371b938>,
'session': {'_accessed_time': 1333897017.5881109, 'messages': [],
'_creation_time': 1333895502.1156459, 'user_id': u'1'}, 'full_path':
'/submit/', 'template_env': <jinja2.environment.Environment object at
0x36a8f10>, 'matchdict': {'controller':
u'mediagoblin.submit.views:submit_start'}, 'user':
<mediagoblin.db.sql.models.User object at 0x3746550>}
  webob.is_body_readable: True
  webob.is_body_seekable: False
  wsgi process: 'Multiprocess'


-- 
GN


reply via email to

[Prev in Thread] Current Thread [Next in Thread]