# ObsPy \_ Read Nanometrics Y file

**URL:** <https://discourse.obspy.org/t/obspy-read-nanometrics-y-file/444>\
**Category:** Users Mailing List Archive\
**Tags:** archive\
**Created:** [September 15, 2015, 11:46am UTC](https://discourse.obspy.org/t/obspy-read-nanometrics-y-file/444 "2015-09-15T11:46:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![doost\_dar\_shoma\_reza](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@doost\_dar\_shoma\_reza](https://discourse.obspy.org/u/doost_dar_shoma_reza)\
**Post date:** [September 15, 2015, 11:46am UTC](https://discourse.obspy.org/t/obspy-read-nanometrics-y-file/444/1 "2015-09-15T11:46:34Z")

</div>

Dear Obspy Users

First of all thanks for your useful package. I’m using obspy for my doctoral program but I have problem with reading nano metrics Y-file which I have. As the attachment I sent you an example file I have.  
I would appreciate if you help me to solve this problem.  
I’ve tried to read it as “read” and “readY” but non of them work, and I got following error

[YAZRSPE.20100119.060433](https://discourse.obspy.org/uploads/short-url/wTb7K6z49M3fO3OikmXbdx9vYfW.060433) (67.2 KB)

[YAZRSPN.20100119.060432](https://discourse.obspy.org/uploads/short-url/2WKyE9gNiFhRyj74L5UIEufvRk6.060432) (67.2 KB)

[YAZRSPZ.20100119.060434](https://discourse.obspy.org/uploads/short-url/dMMPpa2hHlHvtR6OVmMrYSDBdnn.060434) (67.2 KB)

[YFTBBBZ.20100119.060431](https://discourse.obspy.org/uploads/short-url/3fvZU1Qh3J32U5PAyVHmiDJIkkT.060431) (70.3 KB)

---

<div class="post-metadata">

**Author:** ![barsch](https://discourse.obspy.org/user_avatar/discourse.obspy.org/barsch/32/7_2.png) [@barsch](https://discourse.obspy.org/u/barsch)\
**Post date:** [September 15, 2015, 1:45pm UTC](https://discourse.obspy.org/t/obspy-read-nanometrics-y-file/444/2 "2015-09-15T13:45:34Z")

</div>

Dear Meysam Rezaeifar,

there are some invalid non ASCII characters within the STATION\_INFO tag of your Y files. Ignoring them while reading the faulty file is probably the best approach - see [y: Ignore non ASCII characters in TAG\_STATION\_INFO · obspy/obspy@b1300e2 · GitHub](https://github.com/obspy/obspy/commit/b1300e25de0678f362738c6863c285b8a4926e7d) in order to fix your local version of ObsPy - future versions of ObsPy will have this fix included.

Cheers,  
Robert

---

<div class="post-metadata">

**Author:** ![doost\_dar\_shoma\_reza](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@doost\_dar\_shoma\_reza](https://discourse.obspy.org/u/doost_dar_shoma_reza)\
**Post date:** [September 16, 2015, 12:40pm UTC](https://discourse.obspy.org/t/obspy-read-nanometrics-y-file/444/3 "2015-09-16T12:40:17Z")

</div>

Dear Robert

Thank you so much..  
It works now.

You saved my life.

cheers  
meysam

Dear Meysam Rezaeifar,

there are some invalid non ASCII characters within the STATION\_INFO tag  
of your Y files. Ignoring them while reading the faulty file is probably  
the best approach - see  
[https://github.com/obspy/obspy/commit/b1300e25de0678f362738c6863c285b8a4926e7d](https://github.com/obspy/obspy/commit/b1300e25de0678f362738c6863c285b8a4926e7d)  
in order to fix your local version of ObsPy - future versions of ObsPy  
will have this fix included.

Cheers,  
Robert
