Python PDF birleştirici kodunda SyntaxError hatası

grant

Decapat
Katılım
23 Nisan 2022
Mesajlar
696
Çözümler
1
Daha fazla  
Sistem Özellikleri
Rx 550 4GB | i3 10100f | 8GB DDR4 3200Mhz ram | MSI H510M-A PRO
Cinsiyet
Erkek
Meslek
Yazılım
Code:

Python:
import os.
from PyPDF2 import PdfFileMerger.
os.listdir("C:\Users\buğra\Desktop\Yeni klasör") #pdf birleştirici !
#fatura = open("fatura.pdf","rb")
#sertifika = open("sertifika.pdf","rb")
birlestirici = PdfFileMerger()
birlestirici.append("fatura.pdf") #içine direkt fatura.
birlestirici.append("sertifika.pdf") #içine direkt sertifika.
birlestirici.write("birlesenpdf.pdf")

birlestirici.append("sertifika.pdf")
birlestirici.merge(0,"fatura.pdf") #sıra belirleyici.
birlestirici.write("birlesenler_2.pdf")

Hata:

Kod:
ile "C:\Users\buğra\PycharmProjects\pythonProject\main.py", line 3
 os.listdir("C:\Users\buğra\Desktop\Yeni klasör") #pdf birleştirici !
 ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
 
Son düzenleyen: Moderatör:

Geri
Yukarı