mirror of
				https://github.com/deepset-ai/haystack.git
				synced 2025-10-31 09:49:48 +00:00 
			
		
		
		
	Adjust PDF conversion subprocess for Python v3.6 (#194)
This commit is contained in:
		
							parent
							
								
									7ada5a91cd
								
							
						
					
					
						commit
						0eb8a29da9
					
				| @ -128,7 +128,7 @@ class PDFToTextConverter(BaseConverter): | ||||
|             command = ["pdftotext", "-layout", str(file_path), "-"] | ||||
|         else: | ||||
|             command = ["pdftotext", str(file_path), "-"] | ||||
|         output = subprocess.run(command, capture_output=True, shell=False) | ||||
|         output = subprocess.run(command, stdout=subprocess.PIPE, shell=False) | ||||
|         document = output.stdout.decode(errors="ignore") | ||||
|         pages = document.split("\f") | ||||
|         pages = pages[:-1]  # the last page in the split is always empty. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tanay Soni
						Tanay Soni