jamsix / ib-edavki

Skripta, ki prevede XML poročilo trgovalnih poslov v platformi InteractiveBrokers v XML format primeren za uvoz v obrazce Doh-KDVP, D-IFI, Doh-Div in Doh-Obr v eDavkih Finančne uprave.
MIT License
173 stars 57 forks source link

FileNotFoundError #56

Closed PLACEBO92 closed 10 months ago

PLACEBO92 commented 2 years ago

No matter what I do I get this error:

FileNotFoundError: [Errno 2] No such file or directory: 'FURS-export_FY21'

Tried Python 3.9.2 (same as last year, which worked fine), 3.10.2 64bit and 3.10.2 32bit, same result every time.

The files are in the current directory, also tried changing it to sth else. Tried renaming the files also, no luck. Always stuck on the same file.

I fully expect this is because I have not idea what I am doing though. Any help really appreciated.

pronebird commented 2 years ago

Maybe it should be FURS-export_FY21.xml with .xml extension? Can you post the full command you run?

PLACEBO92 commented 2 years ago

Originally I tried ib-edavki FURS_export_FY21 and ib-edavki FURS_export_FY21 FURS_export_YTD22

Just tried ib-edavki FURS_export_FY21.xml and it worked.

But ib-edavki FURS_export_FY21.xml FURS_export_YTD22.xml did not work

pronebird commented 2 years ago

You should run it as something like that:

ib-edavki -y 2021 FURS_export_FY21.xml

Next year you should do:

ib-edavki -y 2022 FURS_export_FY21.xml FURS_export_FY22.xml

etc...

I don't believe you have to include trades from this year as you're submitting a tax report for 2021.

Then ib-edavki should produce four files: D-IFI.xml, Doh-KDVP.xml, Doh-Div.xml and Doh-Obr.xml. Depending on your transactions, some may contain no trades. Then it's as easy as uploading those to e-davki under Dokumenti -> Uvoz.

jamsix commented 2 years ago

You need to include IB export xml files for the last year and every year the opening trades for positions you've closed in the last year might be in. I suggest you include all xml files you've generated sofar. ib-edavki also lets you know which years were included in the final FURS files when you run the script, so you know which PDF documents to include:

Doh-KDVP.xml created (includes trades from years 2018, 2019, 2020, 2021)
D-IFI.xml created (includes trades from years 2020, 2021)

@PLACEBO92 your problem lies in the fact that you have configured your Windows explorer to hide file extensions, so you are unaware they exist. I suggest you enable them. You can always do dir in your CLI to see exactly which files are in your folder or press TAB key when entering the file name and allow the OS to complete the filename of the actual file.

AlyAlyy commented 2 years ago

FileNotFoundError: [Errno 2] No such file or directory: 'ib-xml-1y.xml'

Ive been getting this error... Any ideas? Ive tried putting it in the same directory and (just while testing) in the Python scripts directory(where pip is located)... Kind of drawing a blank here not really sure what to do.

jamsix commented 1 year ago

Can you simply type dir ib-xml* in the console and let us know what the output is?

ddbk commented 1 year ago

@pronebird this is now a year old, but I just wanted to expand on this:

I don't believe you have to include trades from this year as you're submitting a tax report for 2021.

In some cases adding a report for the current year might be necessary as some dividend withholding tax can be adjusted in the beginning of the current year for the dividends received in the past year. A good example are US REITs, as their tax status becomes clear only after the year ends. Current year's report will then contain withholding tax records dated in the past year. We may also want to add a note about this to the docs.