SystemExit - TG 2

10 views
Skip to first unread message

pkraus

unread,
May 20, 2013, 10:46:27 AM5/20/13
to turbo...@googlegroups.com
I am running the latest version of turbogears and its an ERP system that is replacing the current legacy system that we use. I have some migrations thats are written that move the data via odbc and sqlalchemy ODBC brings that data into the app mx.odbc.UNIXODBC to me precsice and then sqlalchemy formats,  validates, and saves it. Some of the migrations are very long running and work 99.9% of the time other times for no reason that i can track down the entire system just falls on its face and i get a very unuseful track back based on SystemExit error. It's maddening because its doesn't happen all the time. I have written a batch script that runs all the imports (basically a link that just does a transaction commit each page and then redirects to the next step) to simulate if i was manually working the migration part of the site. In this case its more likely to happen but even then sometimes it works just fine. The entire process from start to finish can take anywhere from 8 - 12 hours to run so automating it is very useful since i could have it grab a new copy of the data nightly. Instead I have to manually do the migration so that when the below error hits (if it even hits) i can do that step over again. Looking at the trace i can see some lines where some errors might occur with bad data and array index issues that might be a problem but the errors wouldn't bee SystemExit.   Here is a current traceback ...

HELP :)

URL: http://localhost:8080/migrate/tbred_tables
File '/home/pkraus/source/erp/lib/
python2.6/site-packages/WebError-0.10.3-py2.6.egg/weberror/evalexception.py', line 438 in respond
  return_iter = list(app_iter)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/repoze.tm2-2.0b1-py2.6.egg/repoze/tm/__init__.py', line 24 in __call__
  for chunk in self.application(environ, save_status_and_headers):
File '/home/pkraus/source/erp/lib/python2.6/site-packages/repoze.who-1.0.19-py2.6.egg/repoze/who/middleware.py', line 107 in __call__
  app_iter = app(environ, wrapper.wrap_start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/ToscaWidgets-0.9.12-py2.6.egg/tw/core/middleware.py', line 46 in __call__
  return self.wsgi_app(environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/ToscaWidgets-0.9.12-py2.6.egg/tw/core/middleware.py', line 72 in wsgi_app
  resp = req.get_response(self.application)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/WebOb-1.1.1-py2.6.egg/webob/request.py', line 1086 in get_response
  application, catch_exc_info=False)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/WebOb-1.1.1-py2.6.egg/webob/request.py', line 1055 in call_application
  app_iter = application(self.environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/ToscaWidgets-0.9.12-py2.6.egg/tw/core/resource_injector.py', line 70 in _injector
  resp = req.get_response(app)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/WebOb-1.1.1-py2.6.egg/webob/request.py', line 1086 in get_response
  application, catch_exc_info=False)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/WebOb-1.1.1-py2.6.egg/webob/request.py', line 1055 in call_application
  app_iter = application(self.environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Beaker-1.6.3-py2.6.egg/beaker/middleware.py', line 73 in __call__
  return self.app(environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Beaker-1.6.3-py2.6.egg/beaker/middleware.py', line 155 in __call__
  return self.wrap_app(environ, session_start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Routes-1.13-py2.6.egg/routes/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/wsgiapp.py', line 107 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/wsgiapp.py', line 312 in dispatch
  return controller(environ, start_response)
File '/home/pkraus/source/erp/src/erp/lib/base.py', line 31 in __call__
  return TGController.__call__(self, environ, start_response)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 211 in __call__
  response = self._dispatch_call()
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 162 in _dispatch_call
  response = self._inspect_call(func)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py', line 105 in _inspect_call
  result = self._perform_call(func, args)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/TurboGears2-2.2.2-py2.6.egg/tg/controllers/dispatcher.py', line 124 in _perform_call
  r = self._call(func, params, remainder=remainder)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/TurboGears2-2.2.2-py2.6.egg/tg/controllers/decoratedcontroller.py', line 133 in _call
  output = controller_callable(*remainder, **dict(params))
File '/home/pkraus/source/erp/src/erp/controllers/migrate.py', line 450 in tbred_tables
  temp_imports.TItem.import_tbred()
File '/home/pkraus/source/erp/src/erp/model/temp_imports.py', line 233 in import_tbred
  new.item_bin_num = whse_record[0]
File '/home/pkraus/source/erp/lib/python2.6/site-packages/SQLAlchemy-0.8.1-py2.6-linux-i686.egg/sqlalchemy/orm/attributes.py', line 303 in __set__
  instance_dict(instance), value, None)
File '/home/pkraus/source/erp/lib/python2.6/site-packages/SQLAlchemy-0.8.1-py2.6-linux-i686.egg/sqlalchemy/orm/attributes.py', line 705 in set
  old = dict_.get(self.key, NO_VALUE)
SystemExit:

Reply all
Reply to author
Forward
0 new messages