Hello --
I have HVSR data saved in SAC format using SmartSolo's Sololite software. I can load, view, and process the dataset in Geopsy as expected, but when I try to re-open the GPY database file I get the following error:
"Errors occured while opening database, for more details read log."
The log then reads:
"Truncated context at the end of XML (D:/<directory path>/test.gpy at line 14).
Truncated context at the end of XML (D:/<directory path>/_Geopsy/test.gpy)."
Line 14 is the "Name" line, so it appears that the XML importer is unable to parse it correctly.
My workaround is to delete the three instances of the Name line (one per component) from the GPY XML file (I use the "Kate" editor) and save the file, after which I can open the GPY file normally.
Please let me know if you require more information or uploaded files (each component is 50MB).
Thank you,
Joel
Bug saving database with SAC files, XML error
-
- Posts: 2
- Joined: Thu Jan 30, 2025 5:22 pm
Re: Bug saving database with SAC files, XML error
Hi Joel,
Can you upload the .gpy file. Not the SAC files?
Can you upload the .gpy file. Not the SAC files?
-
- Posts: 2
- Joined: Thu Jan 30, 2025 5:22 pm
Re: Bug saving database with SAC files, XML error
Hi -- GPY file as requested.
My workaround is to delete lines 14, 39, and 64.
LMK if you need anything else.
J
My workaround is to delete lines 14, 39, and 64.
LMK if you need anything else.
J
- Attachments
-
- temp.gpy
- (873 Bytes) Downloaded 1494 times
Re: Bug saving database with SAC files, XML error
This is an issue I recently discovered with text fields of SAC headers. Fields have a fixed number of characters (KSTNM 8 for the station name). Until recently, the extra characters were blank spaces if the actual station name is shorter than 8 characters. You are providing a second example where the extra characters are 0 which is the end of string character in C.
If you upgrade to 3.6.0-preview accessible through git only (see download page), upon the import of SAC files the station name will be properly extracted even if there are null characters. When saving the database you won't encounter any error.
To fix existing databases, edit the <name> fields and remove the last strange characters.
If you upgrade to 3.6.0-preview accessible through git only (see download page), upon the import of SAC files the station name will be properly extracted even if there are null characters. When saving the database you won't encounter any error.
To fix existing databases, edit the <name> fields and remove the last strange characters.
Code: Select all
<Signal>
<ID>4</ID>
<Name>3026290^@</Name>
Re: Bug saving database with SAC files, XML error
I am using version 3.5.2 of geopsy and encountered the same issue. I modified the .gpy file according to your solution, but it still reports an error as follows:
Truncated tag at the end of XML (D:/kt/test - 副本.gpy at line 1).
Truncated tag at the end of XML (D:/kt/test - 副本.gpy).
I have attached the original test.gpy and the modified test_modified.gpy.
Hope to get your help.
Thank you!
Sunxu
Truncated tag at the end of XML (D:/kt/test - 副本.gpy at line 1).
Truncated tag at the end of XML (D:/kt/test - 副本.gpy).
I have attached the original test.gpy and the modified test_modified.gpy.
Hope to get your help.


Thank you!
Sunxu
- Attachments
-
- test_modified.gpy
- (745 Bytes) Downloaded 1535 times
-
- test.gpy
- (823 Bytes) Downloaded 1444 times
Re: Bug saving database with SAC files, XML error
Hi Sunxu,
Effectively, you have the same issue with test.gpy.
At first, I was not able to open test_modified.gpy with the ad hoc method:
I tried with unzip and gunzip. After renaming the .gpy file,
The obtained file is a text file with the xml code. Hence, I guess that you compressed contents.xml with gzip. The format read by geopsy is slightly different. It is a tar file compressed with gzip.
Hence the only way to compress the xml file is
Note that you can also rename contents.xml to test_modify.gpy without compressing. It should work also.
Hope it helps,
Marc
Effectively, you have the same issue with test.gpy.
At first, I was not able to open test_modified.gpy with the ad hoc method:
Code: Select all
tar xvfz test_modified.gpy
Code: Select all
mv test_modified.gpy test_modified.gz
gunzip test_modified.gz
Hence the only way to compress the xml file is
Code: Select all
tar cvfz test_modified.gpy contents.xml
Hope it helps,
Marc
Re: Bug saving database with SAC files, XML error
Hi! Thank you for your reply!
In fact, I directly used Kate to edit the original file test.gpy and obtained test_modified.gpy.
According to your instructions, I followed these steps:
1. Use tar xvfz test.gpy to get the context.xml file.
2. Modify all the field Name in the context.xml file, removing the space after the station name.
like Line 14: <Name>3015469 </Name>
3. Rename context.xml to test.gpy.
Then I successfully read the test.gpy file!
Thank you for your help!
Sunxu
In fact, I directly used Kate to edit the original file test.gpy and obtained test_modified.gpy.
According to your instructions, I followed these steps:
1. Use tar xvfz test.gpy to get the context.xml file.
2. Modify all the field Name in the context.xml file, removing the space after the station name.
like Line 14: <Name>3015469 </Name>
3. Rename context.xml to test.gpy.
Then I successfully read the test.gpy file!
Thank you for your help!
Sunxu