Open AdvithShetty opened 7 months ago
Also having this error (Cannot read properties of undefined (reading 'kind')) when importing csv file. Strapi version v4.20.0
Any solution yet?
@AidosMarcos Nope i tried but couldn't figure it out
I am also facing this issue on Strapi v4.17.1 and strapi-plugin-import-export-entries v1.23.1
Same here.
I'm using a python script with a bit of ChatGPT assist to do line by line import from CSV where the first row contains the names of the data fields.
import csv
import requests
import json
# CSV file path
csv_file_path = "C:\\path-to.csv"
# API endpoint
api_endpoint = "http://localhost:1337/api/endpoints"
def send_post_request(data):
"""
Sends a POST request to the API endpoint.
"""
headers = {"Content-Type": "application/json"}
response = requests.post(api_endpoint, data=json.dumps(data), headers=headers)
return response
def process_csv_file(csv_file_path):
"""
Processes each row in the CSV file and sends a POST request.
"""
with open(csv_file_path, mode="r", encoding="utf-8") as file:
csv_reader = csv.DictReader(file)
for row in csv_reader:
data_object = {"data": row}
response = send_post_request(data_object)
print(
f"HTTP Status Code: {response.status_code}, Response: {response.text}"
)
if __name__ == "__main__":
process_csv_file(csv_file_path)
You guys are using a deprecated format. CSV is deprecated and JSON v1 as well.
@kevinvugts Hello I got the same issue! Yeah, notice that the CSV format is deprecated. But is there an alternative way to export CSV?
You guys are using a deprecated format. CSV is deprecated and JSON v1 as well.
Considering there is demand for CSV import/export, why has it been removed?
Describe the bug When i try to export / import csv i am enountering an error. I am using STRAPI VERSION v4.19.1
Import Error
Export Error
How do i fix this?