<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_atype(self, ):
 """Create a atype and store it in the self.atype :returns: None :rtype: None :raises: None """

        name = self.name_le.text()
        desc = self.desc_pte.toPlainText()
        try:
            atype = djadapter.models.Atype(name=name, description=desc)
            atype.save()
            for prj in self.projects:
                atype.projects.add(prj)
            self.atype = atype
            self.accept()
        except:
            log.exception("Could not create new assettype")