Comments (10)
Thanks for reporting this. When I have some time I will look into this!
from export-to-ghostfolio.
Thank you for looking into this! Just one gotcha, the line numbers in the stacktrace are off by 2 lines because I added some debugging to see why it failed and on which of the lines in the CSV file.
from export-to-ghostfolio.
I added a check so whenever a match was not found and it's trying to find a partial name match (this resolves the issue with ISHARES NASDAQ US BIOTECHNOLOGY ETF
. The Korea one can't be found, so I moved the security availability check directly after searching for it. For some reason I had this later in the loop (with marker checks), but when the symbol is not found the first time, it won't be found the second time either.
Can you try again if the tool now runs and results in an importable JSON?
from export-to-ghostfolio.
I have added some checks so the tool doesn't break when no symbols are found. I also added the Product name
from the DEGIRO export to the Yahoo Finance search, and that way (in this case) AMC is found by name. See the code here.
Can you test if this resolves your issue? Thanks!
from export-to-ghostfolio.
Hey @dickwolff Thank you so far! I've tried your changes, yes this partially solved my issue... But now it breaks on the following CSV lines;
01-08-2023,10:03,01-08-2023,ISHARES NASDAQ US BIOTECHNOLOGY ETF,IE00BYXG2H39,DEGIRO Transactiekosten en/of kosten van derden,,EUR,-1.00,EUR,5.54,4c29dd81-bb01-40fa-8dda-aae3d05dae79
01-08-2023,10:03,01-08-2023,ISHARES NASDAQ US BIOTECHNOLOGY ETF,IE00BYXG2H39,"Verkoop 1 @ 5,416 EUR",,EUR,5.42,EUR,6.54,4c29dd81-bb01-40fa-8dda-aae3d05dae79
25-07-2023,14:31,25-07-2023,ISHARES KOREA,IE00B0M63391,DEGIRO Transactiekosten en/of kosten van derden,,EUR,-1.00,EUR,44.92,d4f45240-d763-4b95-8590-2ba158d38207
25-07-2023,14:31,25-07-2023,ISHARES KOREA,IE00B0M63391,"Koop 1 @ 42,53 EUR",,EUR,-42.53,EUR,45.92,d4f45240-d763-4b95-8590-2ba158d38207
With the following error:
█████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 11% | ETA 176s | Duration: 18s | 107/901/home/sander/tmp/Export-To-Ghostfolio/src/converters/degiroConverter.ts:165
result.activities[result.activities.length - 1].symbol = security.symbol;
^
TypeError: Cannot read properties of null (reading 'symbol')
What happens is that the Yahoo Finance search returns nothing (ie. it cannot find anything)
getSecurity(): No initial match found, trying by symbol IDKO
getSecurity(): No match found for symbol IDKO, trying by name ISHARES KOREA
No result found for BUY action for IE00B0M63391 with currency EUR! Please add this manually..
But the deGiro converter still tries to add it to it's result.activities
array and there it also tries to access it's symbol (which it doesn't has).
So I tried to locally fix this, and what I've done is added an optional chaining (.?
) on line 187 and 165,
result.activities[result.activities.length - 1].symbol = security?.symbol;
and after that I get JSON file!
from export-to-ghostfolio.
Thanks for fixing this! I have a now have a JSON blob 🥳
But unfortunately I cannot import it into Ghostfolio at the moment. Ghostfolio is not allowing me to import it because of the following error:
"activities.203.each value in type must be one of the following values: BUY, DIVIDEND, FEE, INTEREST, ITEM, LIABILITY, SELL"
Screenshot:
JSON blob mentioned
{
"accountId": "47ad8e74-9c2e-476e-9cb0-776e8660dea1",
"comment": "txfees",
"fee": 2,
"quantity": 0,
"unitPrice": 0,
"currency": "EUR",
"dataSource": "YAHOO",
"date": "2020-04-21T09:05:00+02:00",
"symbol": "VUSA.AS"
}
from export-to-ghostfolio.
Looks like it only found the transaction fees line but not the actual buy/sell line. They are both in the export?
from export-to-ghostfolio.
Looks like it only found the transaction fees line but not the actual buy/sell line. They are both in the export?
I am seeing some buy and sell lines, but should those buy/sell lines be before or after the fee line?
from export-to-ghostfolio.
Usually, buy/sell records are preceded by transaction fee records, like below:
15-12-2022,16:55,15-12-2022,VICI PROPERTIES INC. C,US9256521090,DEGIRO Transactiekosten en/of kosten van derden,,EUR,"-1,00",EUR,"31,98",5925d76b-eb36-46e3-b017-a61a6d03c3e7
15-12-2022,16:55,15-12-2022,VICI PROPERTIES INC. C,US9256521090,"Koop 1 @ 33,9 USD",,USD,"-33,90",USD,"-33,90",5925d76b-eb36-46e3-b017-a61a6d03c3e7
The tool looks for a buy/sell records after processing a transaction fee line. Given your error below:
{
"accountId": "47ad8e74-9c2e-476e-9cb0-776e8660dea1",
"comment": "txfees",
"fee": 2,
"quantity": 0,
"unitPrice": 0,
"currency": "EUR",
"dataSource": "YAHOO",
"date": "2020-04-21T09:05:00+02:00",
"symbol": "VUSA.AS"
}
This means the tool has read a transaction fee line for VUSA, and then expects a buy/sell record (with that information it can "complete" the record).
from export-to-ghostfolio.
Closing because no response was given. If the issue still persists, please reply so I can reopen the issue.
from export-to-ghostfolio.
Related Issues (20)
- No error indication when debugging errors raised when processing lines. HOT 3
- Support for Interactive Brokers (IBKR) HOT 16
- [Degiro exporter v2] Fees are not properly matched to their transaction HOT 6
- [Degiro exporter v2] Error parsing Dutch transaction export from degiro.nl HOT 4
- No arm linux/arm64 docker image HOT 5
- [Degiro exporter v2] Taxes on dividend are added as dividends instead of substracting it from the dividend HOT 3
- [Degiro exporter v1] undefined 'comment' HOT 3
- Only Fees being processed in Docker HOT 10
- Fix workflow runs on PR from other contributors HOT 6
- Create Yahoo Finance mock for testing purposes HOT 1
- Add test coverage to `SecurityService.ts` HOT 1
- Add functionality to automatically validate JSON and upload to Ghostfolio
- new install fails on dayjs import HOT 2
- Degiro conversion error - module not found HOT 16
- Make DEGIRO V2 GA
- Swchab conversion error HOT 15
- Include BUX csv template HOT 13
- DeGiro conversion failing HOT 2
- Got a parsing error HOT 6
- Error when processing DEGIRO file due to Currency Exchange operation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from export-to-ghostfolio.