mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	Fix serialization of optional elements
This commit is contained in:
		
							parent
							
								
									f74a45c1fe
								
							
						
					
					
						commit
						924c58bde3
					
				|  | @ -429,7 +429,7 @@ def to_bytes(getters, exclude): | |||
| def from_bytes(bytes_data, setters, exclude): | ||||
|     msg = msgpack.loads(bytes_data, encoding='utf8') | ||||
|     for key, setter in setters.items(): | ||||
|         if key not in exclude: | ||||
|         if key not in exclude and key in msg: | ||||
|             setter(msg[key]) | ||||
|     return msg | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user