Patient size import fails if broken study found

Issue #676 resolved
Ed McDonagh
created an issue

Import fails with PatientStudyModuleAttr without any useful message if the study it is targeting is malformed.

Comments (8)

  1. Ed McDonagh reporter
    [2018-10-11 09:50:03,938: ERROR/ForkPoolWorker-3] Task remapp.extractors.ptsizecsv2db.websizeimport[86b5514c-f212-4e42-a758-c29fdd7af487] raised u
    nexpected: DoesNotExist('PatientStudyModuleAttr matching query does not exist.',)
    Traceback (most recent call last):
      File "/var/dose/veopenrem/local/lib/python2.7/site-packages/celery/app/", line 382, in trace_task
        R = retval = fun(*args, **kwargs)
      File "/var/dose/veopenrem/local/lib/python2.7/site-packages/celery/app/", line 641, in __protected_call__
        return*args, **kwargs)
      File "remapp/extractors/", line 171, in websizeimport
        imp_log = l)
      File "remapp/extractors/", line 102, in _ptsizeinsert
        _patientstudymoduleattributes(exam, height, weight, verbose, csvrecord, imp_log = imp_log)
      File "remapp/extractors/", line 40, in _patientstudymoduleattributes
        patientatt = exam.patientstudymoduleattr_set.get()
      File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/", line 127, in manager_method
        return getattr(self.get_queryset(), name)(*args, **kwargs)
      File "/var/dose/veopenrem/local/lib/python2.7/site-packages/django/db/models/", line 334, in get
    Exception: PatientStudyModuleAttr matching query does not exist.
  2. Log in to comment