Fix since Python2.7 doesnt support encoding kwarg to open()
This commit is contained in:
		
							parent
							
								
									eb01e08b04
								
							
						
					
					
						commit
						150c50cabe
					
				|  | @ -24,8 +24,8 @@ def load_asset(filename): | ||||||
|     filepath = '{dirname}/assets/{filename}'.format( |     filepath = '{dirname}/assets/{filename}'.format( | ||||||
|         dirname=os.path.dirname(__file__), filename=filename) |         dirname=os.path.dirname(__file__), filename=filename) | ||||||
|      |      | ||||||
|     with open(filepath, encoding='utf-8') as file: |     with open(filepath, mode="rb") as file: | ||||||
|         return file.read() |         return file.read().decode('utf-8') | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TestYouTubeTranscriptApi(TestCase): | class TestYouTubeTranscriptApi(TestCase): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue