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

[Coinbase] Unable to import simple CSV with bitcoin transactions - "No Decimal Character Found" #1059

Closed
4oo4 opened this issue Dec 19, 2017 · 5 comments
Assignees
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Milestone

Comments

@4oo4
Copy link

4oo4 commented Dec 19, 2017

I am running Firefly III version 4.6.11.1

Description of my issue:

I'm attempting to import a CSV from my bitcoin exchange (Coinbase), but Firefly seems to get the BTC amount wrong each time (showing an impossibly postive/negative bitcoin balance), as if it's ignoring the decimals. At first, I was attempting to import the whole file (about 70 transactions), but for some reason Firefly kept saying there were 350 transactions while importing. From there, I started stripping off columns (the transaction count issue may be due to a weirdly-formatted CSV, I'll dig into that later), and still got the incorrect balances. From looking in the logs, I noticed it was saying that it wasn't recognizing the decimal character.

Steps to reproduce

  • Attempt to import following CSV file in to new bitcoin asset account (config is selecting headers, date format as Y-m-d, and then using Date and Amount columns):
"Date","Amount"
"2013-10-10","0.208"
"2013-10-12","-0.15"
"2013-10-19","-0.03881677"
"2013-10-21","0.33"
"2013-10-22","-0.34918323"
"2013-12-01","0.1"
"2013-12-01","-0.1"
"2013-12-11","0.01124"
"2013-12-11","-0.01124"
"2014-02-14","0.115"
"2014-02-14","-0.115"
"2014-04-04","1.33"

Other important details (log files, system info):

selection_018
selection_019

/firefly/storage/logs/ff3-apache2handler-2017-12-19.log

[2017-12-19 19:45:15] production.DEBUG: debet amount is NULL  
[2017-12-19 19:45:15] production.DEBUG: credit amount is NULL  
[2017-12-19 19:45:15] production.DEBUG: convertedAmount is NULL  
[2017-12-19 19:45:15] production.DEBUG: Amount value is not NULL, assume this is the correct value.  
[2017-12-19 19:45:15] production.DEBUG: Converter class is FireflyIII\Import\Converter\Amount  
[2017-12-19 19:45:15] production.DEBUG: Start with amount "-0.115"  
[2017-12-19 19:45:15] production.DEBUG: No decimal character found. Converted amount from "-0.115" to "-0115".  
[2017-12-19 19:45:15] production.DEBUG: First attempt to convert gives "-115.000000000000"  
[2017-12-19 19:45:15] production.DEBUG: After modifiers the result is: "-115.000000000000"  
[2017-12-19 19:45:15] production.DEBUG: convertedAmount is: "-115.000000000000"  
[2017-12-19 19:45:15] production.DEBUG: In createCurrency()  
@JC5
Copy link
Member

JC5 commented Dec 19, 2017

Thanks for including the logs, and thanks of course for reporting this bug. I believe that the amount converter is unable to handle more than 2 decimals. I’ll check it out and get back to you!

JC5 added a commit that referenced this issue Dec 19, 2017
JC5 added a commit that referenced this issue Dec 19, 2017
@JC5
Copy link
Member

JC5 commented Dec 19, 2017

I've pushed a fix that will go live with the next release (around 1-1-18).

You can see the test cases here. They should all work as expected.

@4oo4
Copy link
Author

4oo4 commented Dec 19, 2017

Sounds good, thanks for the quick fix! I'll check it out with the next release.

I actually got impatient and just patched 4.6.11.1 and it definitely solves it! I can close the issue now, or we can leave it open until it gets released.

Cheers

EDIT: My thing transaction counts ended up being a non-issue, after doing a good import, I realized that the number in the import progress bar that it gives you must be something besides the transaction count, perhaps the number of fields it's parsing?

@JC5 JC5 self-assigned this Dec 20, 2017
@JC5 JC5 added bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release). labels Dec 20, 2017
@JC5 JC5 added this to the 4.6.12 milestone Dec 20, 2017
@JC5
Copy link
Member

JC5 commented Dec 20, 2017

It's the number of lines * the number of steps, which is 5. So 20 transactions is about 100 steps. It's not perfect (not all steps are the same size) but it works fairly well.

I've linked this to the next release and I'll close it when it goes live!

@JC5
Copy link
Member

JC5 commented Dec 28, 2017

Closed to clean up the list.

@JC5 JC5 closed this as completed Dec 28, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

2 participants