Better feed back for missing intent/entity files
							parent
							
								
									670ece35dc
								
							
						
					
					
						commit
						8b71b89cf8
					
				| 
						 | 
				
			
			@ -155,6 +155,10 @@ def load_skill(skill_descriptor, bus, skill_id, BLACKLISTED_SKILLS=None):
 | 
			
		|||
            return skill
 | 
			
		||||
        else:
 | 
			
		||||
            LOG.warning("Module {} does not appear to be skill".format(name))
 | 
			
		||||
    except FileNotFoundError as e:
 | 
			
		||||
        LOG.error(
 | 
			
		||||
            'Failed to load {} due to a missing file: {}'.format(name, str(e))
 | 
			
		||||
            )
 | 
			
		||||
    except Exception:
 | 
			
		||||
        LOG.exception("Failed to load skill: " + name)
 | 
			
		||||
    return None
 | 
			
		||||
| 
						 | 
				
			
			@ -989,7 +993,9 @@ class MycroftSkill:
 | 
			
		|||
 | 
			
		||||
        filename = self.find_resource(intent_file, 'vocab')
 | 
			
		||||
        if not filename:
 | 
			
		||||
            raise ValueError('Unable to find "' + str(intent_file) + '"')
 | 
			
		||||
            raise FileNotFoundError(
 | 
			
		||||
                'Unable to find "' + str(intent_file) + '"'
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
        data = {
 | 
			
		||||
            "file_name": filename,
 | 
			
		||||
| 
						 | 
				
			
			@ -1021,7 +1027,9 @@ class MycroftSkill:
 | 
			
		|||
 | 
			
		||||
        filename = self.find_resource(entity_file + ".entity", 'vocab')
 | 
			
		||||
        if not filename:
 | 
			
		||||
            raise ValueError('Unable to find "' + entity_file + '.entity"')
 | 
			
		||||
            raise FileNotFoundError(
 | 
			
		||||
                'Unable to find "' + entity_file + '.entity"'
 | 
			
		||||
                )
 | 
			
		||||
        name = str(self.skill_id) + ':' + entity_file
 | 
			
		||||
 | 
			
		||||
        self.bus.emit(Message("padatious:register_entity", {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue