Bug 382787 - Currency EUR not found - Version 3.8.0-39fe1124
Summary: Currency EUR not found - Version 3.8.0-39fe1124
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR critical
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-27 08:39 UTC by J Kerckhofs
Modified: 2017-07-29 10:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J Kerckhofs 2017-07-27 08:39:26 UTC
Version 3.8.0-39fe1124

Opening my kmy file, this file was created/modified with the lastest stable 4.8.0 (from 2016-06-14), now tested with the latest version, give the following error, direcly after opening the file, and kMyMoney closes after confirming the error.

Error: Cannot load file U:\KMyMoney\myfile.kmy. Reason: File was not parsable!
Details: 
Currency 'EUR' not found. in file /home/abuild/rpmbuild/BUILD/kmymoney-4.8.1.39fe1124/kmymoney/mymoney/mymoneyfile.cpp line 2 656

Kind regards,
Jimmy
Comment 1 Ralf Habacker 2017-07-27 12:21:07 UTC
(In reply to J Kerckhofs from comment #0)
> Version 3.8.0-39fe1124
> 
> Opening my kmy file, this file was created/modified with the lastest stable
> 4.8.0 (from 2016-06-14), now tested with the latest version, give the
> following error, direcly after opening the file, and kMyMoney closes after
> confirming the error.
> 
> Error: Cannot load file U:\KMyMoney\myfile.kmy. Reason: File was not
> parsable!
> Details: 
> Currency 'EUR' not found. in file
> /home/abuild/rpmbuild/BUILD/kmymoney-4.8.1.39fe1124/kmymoney/mymoney/
> mymoneyfile.cpp line 2 656
This indicates an incomplete kmy file written by 4.8.0. 

A workaround is to unpack the kmy file to a raw xml file (the kmy file is a simple zip archive) and load this file instead. Using this code path currency related issues are catched and fixed.

In the xml file the following xml fragment should be there: 

<CURRENCIES count="186">
  ... 
  <CURRENCY saf="100" symbol="€" type="3" id="EUR" name="Euro" ppu="100" scf="100"/>
  ... 
</CURRENCIES>

If not it indicates the incomplete file case.
Comment 2 J Kerckhofs 2017-07-29 10:46:27 UTC
Hi Ralf,

You're right, my kmy file was incomplete, file size was reduced to 20%.

With the latest good backup it all works fine with version 4.8.1.39fe1124.

Thanks for the prompt reply.

Kind regards,
Jimmy