Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The CSV upload does not support semicolon as separator #631

Open
Tarek-Bohdima opened this issue Mar 28, 2022 · 8 comments
Open

The CSV upload does not support semicolon as separator #631

Tarek-Bohdima opened this issue Mar 28, 2022 · 8 comments
Labels

Comments

@Tarek-Bohdima
Copy link
Member

  • fail to upload:

Payments Batch Upload Failed!
"payment_confirmation_id" is not allowed to be empty;"payment_method" is not allowed to be empty;"paid_at" must be in ISO 8601 date format

@dadiorchen
Copy link
Collaborator

@Tarek-Bohdima this is expected behavior, when you upload payment, you must populate it correctly, please check the test case document for details

@Tarek-Bohdima
Copy link
Member Author

I uploaded the same CSV i downloaded after i filled the fields required and i got this error:
Payments Batch Upload Failed!
"worker_id" is required;"amount" is required;"captures_count" is required;"currency" is required;"payment_confirmation_id" is required;"payment_method" is required;"earnings_id;worker_id;phone;currency;amount;captures_count;payment_confirmation_id;payment_method;paid_at" is not allowed;"field2" is not allowed;"field3" is not allowed;"value" must contain at least one of [id, earnings_id]

2022-03-28_to_2022-03-28 (1) 2.csv

@dadiorchen
Copy link
Collaborator

Hi, @tarek how did you process the cvs file? it's intresting, the format of the CVS from you is completely changed, this is mine:

"earnings_id","worker_id","phone","currency","amount","captures_count","payment_confirmation_id","payment_method","paid_at"
"3257d56f-c4a9-484f-9658-0776efe5337c","90eef52b-ad55-4953-ace9-6a324ae6cec2","123-123-1235","SLL","120000","220","","",""
"18f869d9-ee0f-4dba-a762-42a96d3282bd","9d582e43-7a7a-44b4-8d40-848b6b490bf0","","SLL","120000","105","","",""
"68232687-d1dc-4e0d-a754-905fee7d665a","9d582e43-7a7a-44b4-8d40-848b6b490bf0","","SLL","120000","90","","",""
"ed4a16f5-8c3e-4d05-93e0-2eac0ee60e86","35a23de8-f1ab-4409-be79-3c6a158d5bde","123-123-1234","SLL","120000","99","","",""
"0468269d-c6ee-4b94-bdbe-fbeeddc8030e","35a23de8-f1ab-4409-be79-3c6a158d5bde","123-123-1234","SLL","120000","90","","",""
"80550d5f-9458-40a0-b216-c6877c4c6291","35a23de8-f1ab-4409-be79-3c6a158d5bde","123-123-1234","SLL","0","99","","",""

and this is yours:

earnings_id;worker_id;phone;currency;amount;captures_count;payment_confirmation_id;payment_method;paid_at
3257d56f-c4a9-484f-9658-0776efe5337c;90eef52b-ad55-4953-ace9-6a324ae6cec2;123-123-1235;SLL;120000;220;anyid0119;cash;Monday, Mar 28, 2018
18f869d9-ee0f-4dba-a762-42a96d3282bd;9d582e43-7a7a-44b4-8d40-848b6b490bf0;;SLL;120000;105;anyid0120;cash;Monday, Mar 28, 2019
68232687-d1dc-4e0d-a754-905fee7d665a;9d582e43-7a7a-44b4-8d40-848b6b490bf0;;SLL;120000;90;anyid0121;cash;Monday, Mar 28, 2020
ed4a16f5-8c3e-4d05-93e0-2eac0ee60e86;35a23de8-f1ab-4409-be79-3c6a158d5bde;123-123-1234;SLL;120000;99;anyid0122;cash;Monday, Mar 28, 2021
a92118de-3f57-4447-a9f7-9e0e99e25db4;35a23de8-f1ab-4409-be79-3c6a158d5bde;123-123-1234;SLL;120000;200;anyid0123;cash;Monday, Mar 28, 2022
0468269d-c6ee-4b94-bdbe-fbeeddc8030e;35a23de8-f1ab-4409-be79-3c6a158d5bde;123-123-1234;SLL;120000;90;anyid0124;cash;Monday, Mar 28, 2023
80550d5f-9458-40a0-b216-c6877c4c6291;35a23de8-f1ab-4409-be79-3c6a158d5bde;123-123-1234;SLL;0;99;anyid0125;cash;Monday, Mar 28, 2024

The CVS file's column should be separated by a comma, not semicolon, but your test is definitely meaningful, it's possible for our users doing the same thing, can you tell me what's your steps to deal with the file?

@Tarek-Bohdima
Copy link
Member Author

Tarek-Bohdima commented Mar 30, 2022

Hi @dadiorchen

  • I exported the CSV file,
  • opened it on Mac,
  • it opened on "Numbers" program,
  • i edited it,
  • then exported it as CSV ,
  • I checked how it looked and it looked like the exported file in structure ,
  • and then uploaded it

@dadiorchen
Copy link
Collaborator

dadiorchen commented Mar 31, 2022

@Tarek-Bohdima I did as you said, but got result like this:

earnings_id,worker_id,phone,currency,amount,captures_count,payment_confirmation_id,payment_method,paid_at
18f869d9-ee0f-4dba-a762-42a96d3282bd,9d582e43-7a7a-44b4-8d40-848b6b490bf0,,SLL,120000,105,2222,visa,2022-02-21

Do you know what cause the semicolon to be chosen as seperator? It's unusual for CSV (comma-seperated file)

@Tarek-Bohdima
Copy link
Member Author

@dadiorchen I repeated the steps; to check the colons:
1- exported CSV again, and open in Numbers , and checked it is indeed in commas
2- after editing and exported as CSV , i found the delimters are semicolon
3- trying to change it back to colon , messed the table :)
so i guess i need something other than Numbers program to process the CSV
any advice?
Screenshot 2022-03-31 at 09 01 59
Screenshot 2022-03-31 at 09 05 31
Screenshot 2022-03-31 at 09 21 36

@dadiorchen
Copy link
Collaborator

I think this is definitely possible for our end-user that they run into this trouble too, so I will leave it a valid issue and try to solve it later.
For now, for making you process forward, you can try upload to google drive and open with google sheets, I tried and it works.

@dadiorchen dadiorchen changed the title Payment page: Upload Bug The CVS upload do not support semicolon as separator Apr 1, 2022
@dadiorchen dadiorchen added good first issue Good for newcomers type: enhancement New feature or request tool: Earnings and removed type: bug Something isn't working labels Apr 1, 2022
@neil-gok
Copy link

neil-gok commented Dec 7, 2022

@dadiorchen I just joined the team and looking for "good first issue" tags for admin api. However, reading through this thread, I don't see this as being a bug. Are we saying we are going to accept commas and semicolon as delimiter?

@nmcharlton nmcharlton changed the title The CVS upload do not support semicolon as separator The CSV upload does not support semicolon as separator Dec 10, 2022
@nmcharlton nmcharlton removed the good first issue Good for newcomers label Dec 10, 2022
@dadiorchen dadiorchen removed their assignment Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

4 participants