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

Ofx import fails #794

Open
janopae opened this issue Mar 3, 2024 · 2 comments · May be fixed by #784
Open

Ofx import fails #794

janopae opened this issue Mar 3, 2024 · 2 comments · May be fixed by #784
Labels
bug Something isn't working
Milestone

Comments

@janopae
Copy link

janopae commented Mar 3, 2024

When I import an .ofx file created using csv2ofx, it says "nothing to import from this file". Using a qif file created with the same program for the same source file works.

All the exception says on the command line is the following:

System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(TextReader txtReader)
   at OfxSharp.OFXDocumentParser.Parse(String ofxString)
   at OfxSharp.OFXDocumentParser.ParseOfxDocument(String ofxString)
   at OfxSharp.OFXDocumentParser.Import(String ofx)
   at NickvisionMoney.Shared.Models.Account.ImportFromOFXAsync(String path, String defaultTransactionRGBA) in /run/build/org.nickvision.money/NickvisionMoney.Shared/Models/Account.cs:line 1455

I can reproduce this using the following, simplified .ofx file example:

DATA:OFXSGML
ENCODING:UTF-8
<OFX>
	<SIGNONMSGSRSV1>
		<SONRS>
			<STATUS>
				<CODE>0</CODE>
				<SEVERITY>INFO</SEVERITY>
			</STATUS>
			<DTSERVER>20240303191311</DTSERVER>
			<LANGUAGE>ENG</LANGUAGE>
		</SONRS>
	</SIGNONMSGSRSV1>
	<BANKMSGSRSV1>
		<STMTTRNRS>
			<TRNUID></TRNUID>
			<STATUS>
				<CODE>0</CODE>
				<SEVERITY>INFO</SEVERITY>
			</STATUS>
			<STMTRS>
				<CURDEF>USD</CURDEF>
				<BANKACCTFROM>
					<BANKID>4e35febee7b31708a1a684aa56bdd138</BANKID>
					<ACCTID>551568e291660420b29e0bb0f6356e82</ACCTID>
					<ACCTTYPE>CHECKING</ACCTTYPE>
				</BANKACCTFROM>
				<BANKTRANLIST>
					<DTSTART>19700101</DTSTART>
					<DTEND>20240303</DTEND>
					<STMTTRN>
						<TRNTYPE>DEBIT</TRNTYPE>
						<DTPOSTED>20240301000000</DTPOSTED>
						<TRNAMT>-0.00</TRNAMT>
						<FITID>5104ca1953db7f888871994ded5ddd61</FITID>
						<NAME>Test</NAME>
						<MEMO>Test</MEMO>
					</STMTTRN>
				</BANKTRANLIST>
			</STMTRS>
		</STMTTRNRS>
	</BANKMSGSRSV1>
</OFX>
@nlogozzo
Copy link
Member

nlogozzo commented Mar 3, 2024

Denaro is currently in the process of a C++ rewrite with a new OFX import method...I will test it with that and make sure it works.

@nlogozzo nlogozzo added the bug Something isn't working label Mar 3, 2024
@nlogozzo nlogozzo added this to the V2024.2.1 milestone Mar 3, 2024
@nlogozzo nlogozzo linked a pull request Mar 4, 2024 that will close this issue
7 tasks
@janopae
Copy link
Author

janopae commented Mar 5, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants