Query the complete salesforce object and write it in a csv file using salesforce bulk api

I am newbie to salesforce i am trying to query the salesforce contact object and trying to fetch the all the records from contact object and write it in a csv file. I am trying to do it from below python code

import http.client
import ast
from simple_salesforce import Salesforce
from salesforce_bulk import SalesforceBulk
import re
import time

conn = http.client.HTTPSConnection("my.sandbox.my.salesforce.com")
payload = 'client_id=<my-client-id>&username=<username>&password=<passowrd>&grant_type=password&version=52'
headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/services/oauth2/token", payload, headers)
res = conn.getresponse()
data = res.read()
credentials = ast.literal_eval(data.decode("utf-8"))
bearer_token = credentials["access_token"]
instance_url = credentials["instance_url"]
bulk = SalesforceBulk(sessionId=bearer_token, host=instance_url)
sf = Salesforce(instance_url=instance_url, session_id=bearer_token)
desc = sf.Contact.describe()
field_names = [field["name"] for field in desc["fields"]]
soql_query = f"SELECT {', '.join(field_names)} FROM Contact"
job = bulk.create_query_job("Contact", contentType="CSV", pk_chunking=True)
results = sf.query_all(soql_query)
batch = bulk.query(job, soql_query)
while not bulk.is_batch_done(batch):
    time.sleep(10)

w = []
# Get the results
for result in bulk.get_all_results_for_query_batch(batch):
    reader = unicodecsv.DictReader(result, encoding='utf-8')
    for row in reader:
        w.append(row)

If i am trying to run above code, then it is giving below error

 File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/salesforce_bulk/salesforce_bulk.py", line 435, in is_batch_done
    raise BulkBatchFailed(job_id, batch_id, status.get('stateMessage'), batch_state)
salesforce_bulk.salesforce_bulk.BulkBatchFailed: Batch 75179000005QyH4AAK of job None failed: InvalidBatch : Failed to process query: INVALID_FIELD: PhotoUrl, Jigsaw, JigsawContactId, Pronouns, GenderIdentity, cvup2__AdditionalReportsTo__c                                    ^ ERROR at Row:1:Column:951 No such column 'Pronouns' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

What i understood from above error is the custom field need to be appended with ‘__c’ issue and i tried even trying to add the ‘__c’ for custom fields using below line but still gives same above error

custom_field_names = [f"{field}__c" if not re.match(r".*__c$", field) else field for field in field_names]

But when i try to run below query it is running successfully and fetching the data

soql_query = “SELECT Id, LastName FROM Contact LIMIT 10”

I tried even below query also that is also not working

SELECT FIELDS(ALL) FROM Contacts

But it is giving below error and i tried to use bulk version 52 still getting same error

salesforce_bulk.salesforce_bulk.BulkBatchFailed: Batch 75179000005QyDRAA0 of job None failed: InvalidBatch : Failed to process query: UNSUPPORTED_API_VERSION: SELECT FIELDS(ALL) FROM Contact        ^ ERROR at Row:1:Column:8 The SOQL FIELDS function is not supported in this version of the API

Please help me with how can i get all fields from the object and store it as a csv file or please point out where i am doing wrong here

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật