I am working on python program which get some data from SQL database and arrange it in a pdf file in Arabic language, so I use these libraries;
# -*- coding: utf-8 -*-
from fpdf import FPDF, XPos, YPos
from arabic_reshaper import reshape
from bidi.algorithm import get_display
import types
import mysql.connector
When I call the function create_pdf()
method I get the warning;
C:\Users\ASUS\PycharmProjects\pythontelegrambot\venv\Scripts\python.exe C:\Users\ASUS\PycharmProjects\pythontelegrambot\p_...
meta NOT subset; don't know how to subset; dropped
connected
Code Sample
def create_pdf(data1, data2):
pdf = FPDF('L', 'mm', 'A4')
pdf.add_page()
pdf.add_font('arabic', '', 'C:\\Windows\\Fonts\\msuighur.ttf')
pdf.set_font('arabic', size=14)
#print positive
m = len(data1) - 1
sump = 0
for i in range(m, -1, -1): sump += data1[i][1]
spaces = 0
#print titles1
pdf.cell(len('اجمالي المستحق') * 1.7, 10, txt=get_display(reshape('اجمالي المستحق')), border=True, align='C')
for i in range(m, -1, -1):
pdf.cell(len(data1[i][0]) * 1.7, 10, txt=get_display(reshape(data1[i][0])), border=True, align='C',
new_x=XPos.LMARGIN if i == 0 else XPos.RIGHT, new_y=YPos.NEXT if i == 0 else YPos.TOP)
spaces += len(data1[i][0]) * 1.7
# print values 1
pdf.cell(len('اجمالي المستحق') * 1.7, 10, txt=str(sump), border=True, align='C')
for i in range(m, -1, -1):
pdf.cell(len(data1[i][0]) * 1.7, 10, txt=str(data1[i][1]), border=True, align='C',
new_x=XPos.LMARGIN if i == 0 else XPos.RIGHT, new_y=YPos.NEXT if i == 0 else YPos.TOP)
# calculate negatives
n = len(data2)-1
net = 0
spaces1 = 0
spaces2 = 0
for i in range(math.floor(n / 2), -1, -1): spaces1 += len(data2[i][0])*2
for i in range(n, math.floor(n/2), -1): spaces2 += len(data2[i][0])*2
for i in range(n, -1, -1): net += data2[i][1]
pdf.cell(spaces - spaces1+len('اجمالي المستحق') * 1.7, 10, txt=get_display(reshape('')), border=False, align='C')
for i in range(math.floor(n/2), -1, -1):
pdf.cell(len(data2[i][0]) * 2, 10, txt=get_display(reshape(data2[i][0])), border=True, align='C',
new_x=XPos.LMARGIN if i == 0 else XPos.RIGHT, new_y=YPos.NEXT if i == 0 else YPos.TOP)
################################
#valus
pdf.cell(spaces - spaces1 + len('اجمالي المستحق') * 1.7, 10, txt=get_display(reshape('')), border=False, align='C')
for i in range(math.floor(n / 2), -1, -1):
pdf.cell(len(data2[i][0]) * 2, 10, txt=str(data2[i][1]), border=True, align='C',
new_x=XPos.LMARGIN if i == 0 else XPos.RIGHT, new_y=YPos.NEXT if i == 0 else YPos.TOP)
#####################################
pdf.cell(spaces - spaces2 + len('اجمالي المستحق') * 1.7, 10, txt=get_display(reshape('')), border=False, align='C')
for i in range(n, math.floor(n/2), -1):
pdf.cell(len(data2[i][0]) * 2, 10, txt=get_display(reshape(data2[i][0])), border=True, align='C',
new_x=XPos.LMARGIN if i == math.floor(n/2)+1 else XPos.RIGHT, new_y=YPos.NEXT if i == math.floor(n/2)+1 else YPos.TOP)
############################valus
pdf.cell(spaces - spaces2 + len('اجمالي المستحق') * 1.7, 10, txt=get_display(reshape('')), border=False, align='C')
for i in range(n, math.floor(n / 2), -1):
pdf.cell(len(data2[i][0]) * 2, 10, txt=str(data2[i][1]), border=True, align='C',
new_x=XPos.LMARGIN if i == math.floor(n/2)+1 else XPos.RIGHT, new_y=YPos.NEXT if i == math.floor(n/2)+1 else YPos.TOP)
# print values2
pdf.cell(len('الصافي') * 1.7, 10, txt=get_display(reshape("الصافي")), border=True, align='C')
pdf.cell(len('الصافي') * 1.7, 10, txt=str(sump - net), border=True, align='C')
pdf.output("hello_world.pdf")
Please help explain what the warning is about.
I tried to search inside libraries I used about that warning but found nothing.