[Gmsh] problem in gshhs2geo.py

Oliver Willekens oliver.willekens at elis.ugent.be
Sat Jan 10 15:54:38 CET 2015


I doubt this has anything to do with gmsh itself: the error you’re getting
is obviously related to a unicode decoding.

Also, your problem on this mailing list is not well-defined: what is this
gshhs2geo.py, where does it come from? All I can see for now is that this
script is calling a python method for which we don’t have the source:
binh = fgshhs.read(11 * 4)

It is possible the developer of this script intended it to be used only on
python2.x, not python3.x, which is apparently what you’re using. Check with
the developer of this script to solve your error.
​

2015-01-10 15:17 GMT+01:00 Mohammad Kazem <mksharifian at gmail.com>:

>  Hi everyone,
>
>  I'm trying to run the script *gshhs2geo.py* to create .geo files, but i
> got this error.
>
>  Any advice?
>
>  Thanks,
> Mohammad
>
>
> Traceback (most recent call last):
>   File
> "C:\Users\Desktop\OceanModels\FVCOM\meshGeneration\meshGeneration\gshhs2geo.py",
> line 81, in <module>
>     binh = fgshhs.read(11 * 4)
>   File "C:\Python33\lib\encodings\cp1252.py", line 23, in decode
>     return codecs.charmap_decode(input,self.errors,decoding_table)[0]
> UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position
> 138: character maps to <undefined>
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
>
>


-- 
Oliver Willekens
PhD Student
[image: LCP group logo] <https://lcp.elis.ugent.be/>

Liquid Crystals & Photonics Group
Sint- Pietersnieuwstraat 41
9000 Gent
Phone: +32 9 264.89.51
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150110/87877922/attachment.html>