Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5362 closed defect (duplicate)

Audio submission test fails with

Reported by: Jessica Tallon Owned by:
Priority: major Milestone: 0.9.0
Component: programming Keywords: tests
Cc: Christopher Allan Webber, Elrond Parent Tickets:

Description

When running the tests, the TestSubmission.test_audio test fails, here is the traceback:

Traceback (most recent call last):
  File "/home/tsyesika/mediagoblin/mediagoblin/tests/test_submission.py", line 393, in test_audio
    self.check_normal_upload('Audio', path)
  File "/home/tsyesika/mediagoblin/mediagoblin/tests/test_submission.py", line 127, in check_normal_upload
    **self.upload_data(filename))
  File "/home/tsyesika/mediagoblin/mediagoblin/tests/test_submission.py", line 90, in do_post
    response = self.test_app.post(url, data, **kwargs)
  File "/home/tsyesika/mediagoblin/local/lib/python2.7/site-packages/WebTest-1.4.3-py2.7.egg/webtest/app.py", line 838, in post
    content_type=content_type)
  File "/home/tsyesika/mediagoblin/local/lib/python2.7/site-packages/WebTest-1.4.3-py2.7.egg/webtest/app.py", line 810, in _gen_request
    expect_errors=expect_errors)
  File "/home/tsyesika/mediagoblin/local/lib/python2.7/site-packages/WebTest-1.4.3-py2.7.egg/webtest/app.py", line 1102, in do_request
    res = req.get_response(app, catch_exc_info=True)
  File "build/bdist.linux-x86_64/egg/webob/request.py", line 1313, in send
    application, catch_exc_info=True)
  File "build/bdist.linux-x86_64/egg/webob/request.py", line 1281, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/tsyesika/mediagoblin/local/lib/python2.7/site-packages/WebTest-1.4.3-py2.7.egg/webtest/lint.py", line 179, in lint_app
    iterator = application(environ, start_response_wrapper)
  File "/home/tsyesika/mediagoblin/mediagoblin/app.py", line 342, in __call__
    return self.call_backend(environ, start_response)
  File "/home/tsyesika/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.10.4-py2.7.egg/werkzeug/wsgi.py", line 591, in __call__
    return self.app(environ, start_response)
  File "/home/tsyesika/mediagoblin/mediagoblin/app.py", line 276, in call_backend
    return self._finish_call_backend(request, environ, start_response)
  File "/home/tsyesika/mediagoblin/mediagoblin/app.py", line 318, in _finish_call_backend
    response = controller(request)
  File "/home/tsyesika/mediagoblin/mediagoblin/decorators.py", line 47, in wrapper
    return controller(request, *args, **kwargs)
  File "/home/tsyesika/mediagoblin/mediagoblin/decorators.py", line 74, in new_controller_func
    return controller(request, *args, **kwargs)
  File "/home/tsyesika/mediagoblin/mediagoblin/decorators.py", line 47, in wrapper
    return controller(request, *args, **kwargs)
  File "/home/tsyesika/mediagoblin/mediagoblin/decorators.py", line 74, in new_controller_func
    return controller(request, *args, **kwargs)
  File "/home/tsyesika/mediagoblin/mediagoblin/decorators.py", line 103, in wrapper
    return controller(request, *args, **kwargs)
  File "/home/tsyesika/mediagoblin/mediagoblin/submit/views.py", line 73, in submit_start
    user=request.user.username)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/attributes.py", line 316, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/attributes.py", line 611, in get
    value = callable_(state, passive)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/state.py", line 442, in __call__
    self.manager.deferred_scalar_loader(self, toload)
  File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/loading.py", line 555, in load_scalar_attributes
    (state_str(state)))
DetachedInstanceError: Instance <LocalUser at 0x7fe7368aa8d0> is not bound to a Session; attribute refresh operation cannot proceed

Change History (5)

comment:1 by Jessica Tallon, 9 years ago

Cc: Christopher Allan Webber Elrond added

comment:2 by Christopher Allan Webber, 9 years ago

Man do I ever hate the way we use global variables. That's at the root of why this is biting us so much. :(

I'll try to take a look as soon as I'm able but don't be afraid to ping me on this one.

comment:3 by Loic Dachary, 9 years ago

I think this is a duplicate of https://issues.mediagoblin.org/ticket/5385. The root of the problem is that installation instructions are incomplete. It was fixed for Debian GNU/Linux jessie but the same kind of test / patch should be done for all distributions.

comment:4 by Christopher Allan Webber, 9 years ago

Resolution: duplicate
Status: newclosed

I don't think this is a duplicate of #5385, but it is a duplicate of #5349. I don't think this is a dependency issue... it's an sqlalchemy session issue.

comment:5 by Christopher Allan Webber, 9 years ago

Milestone: 0.8.20.9.0

All 0.8.2 tickets are being rolled over to 0.9.0

Note: See TracTickets for help on using tickets.