-
Notifications
You must be signed in to change notification settings - Fork 29
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
Cannot import project from SplitWise #159
Comments
Hi, Thanks for the bug report. Maybe Splitwise changed their export format. Maybe there is a bug in Cospend 😁. If you provide an example file I can debug that and fix Cospend import process. |
I just saw right now you replied. Exported csv is attached |
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Thanks for the file. Splitwise had the strange idea to translate the csv column names... So they can't be predicted unless we know their sources... Even then, translations are not permanent, they can change. There is no obvious good solution to fix the import process in Cospend... If the column order is always the same we can use that to identify them instead of their names. Immediate solution for you: rename the columns in your file:
becomes
A small fix to the import process was still needed. If you can try v1.4.9-4-nightly, great. If not, next release is coming soon and will include the fix. You will still need to bring the column names back to English 😁. |
It worked to import the Splitwise file after upgrading to nightly and changing to english names like you said. I don't even understand why the language there is in German since my device language aswell as my app language is english. Pretty weird. Thank you for solving this issue and thank you for doing this awesome project. Edit: Switching the language within the account settings on Splitwise.com and then exporting makes them export in english again. So maybe everyone who wants to export should switch to english before exporting. Or like you said, you can just delete the first 5 columns of the first row and put the english versions there within the import script if the order is always the same which it seems it is. Edit2: I double checked if it imported correctly and it seems the numbers for how much debt each person has is wrong. Here is the data for settlements. Person 2 --> Person1 : 42,43 Whereas in cospend it will calculate to following settlement payments: So as visible, the data is wrong. Maybe you can troubleshoot the problem with the information provided now. By the way, exporting non group sheets from splitwise apparently adds a line so that it looks like this, I guess you have to also create a fix for that:
|
…ll splits Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
…ne is not the first one Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Ouch, I had a look at the implementation. It was only working with equally spit bills which involve all members. I didn't test this feature enough when reviewing the related PR... It is fixed now, both bill creation and handling when there is some content before the "column names" line. v1.4.9-5-nightly is available. It was a bit tricky to find a way to import data correctly. Splitwise does not leave any trace of who pays and owes. It just mentions the effect of each bill on the balances. The only way I found to generate valid Cospend bills with this information is:
So in the end the Cospend bill list does not look like the Splitwise one because we don't have enough information in the exported files. I hope your file covers all the split scenarios and the Cospend import process is now generic enough to work all time. The balances for your example project now fit the Splitwise ones. There still is a small difference due to an unavoidable divergence in rounding choices 😁 :
Thank you very much for helping there. I would have never noticed those bugs. |
Hello, I'm sorry I answer just now, EDIT: Works flawlessly after correct update! (Old answer) |
Yes, v1.4.9-5-nightly Are you sure it upgraded to v1.4.9-5-nightly? I just tried again with your original file (after fixing the column names) and it works fine. |
I'm sorry I could not try since my internet providers cable was destroyed by some construction works and my server is just back online now - horrible days. Anyways, I uninstalled cospend and reinstalled and then updated it with nightly and now it works. Awesome! I tested with a few untouched splitwise exports, where even in between it was settled up and also that worked perfectly. So now it's really possible for everyone to export and import without problems. Flawless fix! So again, thank you very much for this awesome support! Can't be seen every day that a dev fixes the problems so fast. I'm impressed! @eneiluj you can mark this as resolved |
Hello, I wanted to go and import from Splitwise as advertised. Went to Splitwise, pressed export, copied the export.csv to nextcloud and from there went to the cospend app to import it into a new project. Unfortunately, it says the csv is malformed and cannot be imported.
Has something changed or why isnt this possible?
The text was updated successfully, but these errors were encountered: