Skip to content

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 17: invalid start byte #271

@r2r2r2o

Description

@r2r2r2o

Expected Behavior

Generate map file for Malta on newly created environment.

Current Behavior

Exception while processing step 'Creating .map files for tiles'

Steps to Reproduce the Issue

  1. Setup environment according to tutorial.

Context

  • OS/Platform: Windows 10 x64
  • Other information regarding your environment :
(gdal-user) C:\Users\User\anaconda3\Library\bin>conda list
# packages in environment at C:\Users\Archi\anaconda3\envs\gdal-user:
#
# Name                    Version                   Build  Channel
beautifulsoup4            4.11.2             pyha770c72_0    conda-forge
blosc                     1.21.6               h85f69ea_0    conda-forge
boost-cpp                 1.78.0               h9f4b32c_4    conda-forge
brotli-python             1.1.0           py310h9e98ed7_2    conda-forge
bs4                       4.11.2               hd8ed1ab_0    conda-forge
bzip2                     1.0.8                h2466b09_7    conda-forge
ca-certificates           2025.1.31            h56e8100_0    conda-forge
cairo                     1.16.0            h0ac17fb_1012    conda-forge
certifi                   2024.12.14         pyhd8ed1ab_0    conda-forge
cfitsio                   4.2.0                h9ebe7e4_0    conda-forge
charset-normalizer        3.4.1              pyhd8ed1ab_0    conda-forge
curl                      8.1.2                h68f0423_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_1    conda-forge
expat                     2.6.4                he0c23c2_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_3    conda-forge
fontconfig                2.15.0               h765892d_1    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
freexl                    1.0.6                h67ca5e6_1    conda-forge
gdal                      3.6.3           py310h644bc08_0    conda-forge
geojson                   2.5.0                      py_0    conda-forge
geos                      3.11.1               h1537add_0    conda-forge
geotiff                   1.7.1                hb4c6682_7    conda-forge
gettext                   0.22.5               h5728263_3    conda-forge
gettext-tools             0.22.5               h5a7288d_3    conda-forge
glib                      2.78.1               h12be248_0    conda-forge
glib-tools                2.78.1               h12be248_0    conda-forge
gst-plugins-base          1.22.7               h001b923_0    conda-forge
gstreamer                 1.22.7               hb4038d2_0    conda-forge
hdf4                      4.2.15               h1334946_6    conda-forge
hdf5                      1.12.2          nompi_h57737ce_101    conda-forge
icu                       70.1                 h0e60522_0    conda-forge
idna                      3.10               pyhd8ed1ab_1    conda-forge
intel-openmp              2024.2.1          h57928b3_1083    conda-forge
kealib                    1.5.0                h61be68b_0    conda-forge
kiwisolver                1.4.7           py310hc19bc0b_0    conda-forge
krb5                      1.20.1               heb0366b_0    conda-forge
lcms2                     2.15                 h3e3b177_1    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libaec                    1.1.3                h63175ca_0    conda-forge
libasprintf               0.22.5               h5728263_3    conda-forge
libasprintf-devel         0.22.5               h5728263_3    conda-forge
libblas                   3.9.0           29_h576b46c_mkl    conda-forge
libcblas                  3.9.0           29_h7ad3364_mkl    conda-forge
libclang                  15.0.7          default_h3a3e6c3_5    conda-forge
libclang13                15.0.7          default_hf64faad_5    conda-forge
libcurl                   8.1.2                h68f0423_0    conda-forge
libdeflate                1.17                 hcfcfb64_0    conda-forge
libexpat                  2.6.4                he0c23c2_0    conda-forge
libffi                    3.4.6                h537db12_0    conda-forge
libgdal                   3.6.3                h1443b5b_0    conda-forge
libgettextpo              0.22.5               h5728263_3    conda-forge
libgettextpo-devel        0.22.5               h5728263_3    conda-forge
libglib                   2.78.1               he8f3873_0    conda-forge
libhwloc                  2.11.2          default_hc8275d1_1000    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libintl                   0.22.5               h5728263_3    conda-forge
libintl-devel             0.22.5               h5728263_3    conda-forge
libjpeg-turbo             2.1.5.1              hcfcfb64_1    conda-forge
libkml                    1.3.0             h538826c_1021    conda-forge
liblapack                 3.9.0           29_hacfb0e4_mkl    conda-forge
liblzma                   5.6.4                h2466b09_0    conda-forge
liblzma-devel             5.6.4                h2466b09_0    conda-forge
libnetcdf                 4.9.1           nompi_h83fa41b_102    conda-forge
libogg                    1.3.5                h2466b09_0    conda-forge
libpng                    1.6.46               had7236b_0    conda-forge
libpq                     15.3                 ha9684e8_1    conda-forge
librttopo                 1.1.0               he22b5cd_12    conda-forge
libspatialite             5.0.1               hfdcade0_23    conda-forge
libsqlite                 3.48.0               h67fdade_1    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libtiff                   4.5.0                hc3b8658_5    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp-base              1.5.0                h3b0e114_0    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.13.5               he286e8c_1    conda-forge
libxslt                   1.1.39               h3df6e99_0    conda-forge
libzip                    1.10.1               h1d365fa_3    conda-forge
libzlib                   1.3.1                h2466b09_2    conda-forge
lxml                      4.9.4           py310hba208d0_0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
matplotlib                3.4.3           py310h5588dad_2    conda-forge
matplotlib-base           3.4.3           py310h79a7439_2    conda-forge
mkl                       2024.2.2            h66d3029_15    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
numpy                     1.26.4          py310hf667824_0    conda-forge
openjpeg                  2.5.0                ha2aaf27_2    conda-forge
openssl                   3.1.8                ha4e3fda_0    conda-forge
packaging                 24.2               pyhd8ed1ab_2    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pillow                    9.5.0           py310hb653ca7_1    conda-forge
pip                       25.0.1             pyh8b19718_0    conda-forge
pixman                    0.44.2               had0cd8c_0    conda-forge
ply                       3.11               pyhd8ed1ab_3    conda-forge
poppler                   23.03.0              h934c637_1    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
postgresql                15.3                 h96452e4_1    conda-forge
proj                      9.1.1                heca977f_2    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                h2466b09_4    conda-forge
pyparsing                 3.2.1              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9          py310h1fd54f2_5    conda-forge
pyqt5-sip                 12.12.2         py310h00ffb61_5    conda-forge
pysocks                   1.7.1              pyh09c184e_7    conda-forge
python                    3.10.13         h4de0772_0_cpython    conda-forge
python-dateutil           2.9.0.post0        pyhff2d567_1    conda-forge
python_abi                3.10                    5_cp310    conda-forge
qt-main                   5.15.8               h88fe7eb_7    conda-forge
requests                  2.28.2             pyhd8ed1ab_1    conda-forge
setuptools                75.8.0             pyhff2d567_0    conda-forge
shapely                   1.8.5           py310h8c82734_2    conda-forge
sip                       6.7.12          py310h00ffb61_0    conda-forge
six                       1.17.0             pyhd8ed1ab_0    conda-forge
snappy                    1.2.1                h500f7fa_1    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
sqlite                    3.48.0               h2466b09_1    conda-forge
tbb                       2021.13.0            h62715c5_1    conda-forge
tiledb                    2.13.2               h3132609_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_1    conda-forge
tomli                     2.2.1              pyhd8ed1ab_1    conda-forge
tornado                   6.4.2           py310ha8f682b_0    conda-forge
tzdata                    2025a                h78e105d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_1    conda-forge
uriparser                 0.9.8                h5a68840_0    conda-forge
urllib3                   1.26.19            pyhd8ed1ab_0    conda-forge
vc                        14.3                h5fd82a7_24    conda-forge
vc14_runtime              14.42.34433         h6356254_24    conda-forge
vs2015_runtime            14.42.34433         hfef2bbc_24    conda-forge
wahoomc                   4.3.0                    pypi_0    pypi
wheel                     0.45.1             pyhd8ed1ab_1    conda-forge
win_inet_pton             1.1.0              pyh7428d3b_8    conda-forge
xerces-c                  3.2.5                he0c23c2_2    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xz                        5.6.4                h208afaa_0    conda-forge
xz-tools                  5.6.4                h2466b09_0    conda-forge
zlib                      1.3.1                h2466b09_2    conda-forge
zstd                      1.5.6                h0ea2cb4_0    conda-forge


(gdal-user) C:\Users\User\anaconda3\Library\bin>pip list
Package            Version
------------------ -----------
beautifulsoup4     4.11.2
Brotli             1.1.0
certifi            2024.12.14
charset-normalizer 3.4.1
cycler             0.12.1
GDAL               3.6.3
geojson            2.5.0
idna               3.10
kiwisolver         1.4.7
lxml               4.9.4
matplotlib         3.4.3
numpy              1.26.4
packaging          24.2
Pillow             9.5.0
pip                25.0.1
ply                3.11
pyparsing          3.2.1
PyQt5              5.15.9
PyQt5-sip          12.12.2
PySocks            1.7.1
python-dateutil    2.9.0.post0
requests           2.28.2
setuptools         75.8.0
Shapely            1.8.5.post1
sip                6.7.12
six                1.17.0
soupsieve          2.5
toml               0.10.2
tomli              2.2.1
tornado            6.4.2
urllib3            1.26.19
wahoomc            4.3.0
wheel              0.45.1
win_inet_pton      1.1.0

Log Output / Stack Trace

(gdal-user) C:\Users\User\anaconda3\Library\bin>python -m wahoomc gui
INFO:Last run was with version None, deleting Windows Tooling files of C:\Users\User\wahooMapsCreatorData\_download\tooling_win directory due to possible bad files.
INFO:# Need to download Osmosis application for Windows
INFO:--------------------------------------------------------------------------------
INFO:# Downloading osmosis.bat file
INFO:+ Downloaded: C:\Users\User\wahooMapsCreatorData\_download\tooling_win\Osmosis\bin\osmosis.bat, took 2.077 s
INFO:# Need to download osmfilter application for Windows
INFO:--------------------------------------------------------------------------------
INFO:# Downloading osmfilter.exe file
INFO:+ Downloaded: C:\Users\User\wahooMapsCreatorData\_download\tooling_win\osmfilter.exe, took 0.200 s
INFO:# Need to download geofabrik file
INFO:--------------------------------------------------------------------------------
INFO:# Downloading geofabrik.json file
INFO:+ Downloaded: C:\Users\User\wahooMapsCreatorData\_download\geofabrik.json, took 1.042 s
INFO:--------------------------------------------------------------------------------
INFO:--------------------------------------------------------------------------------
INFO:# check C:\Users\User\wahooMapsCreatorData\_download\geofabrik.json file
INFO:# Input country: malta.
INFO:--------------------------------------------------------------------------------
INFO:+ Involved country: malta
INFO:--------------------------------------------------------------------------------
INFO:# check C:\Users\User\wahooMapsCreatorData\_download\land-polygons-split-4326\land_polygons.shp file
INFO:+ C:\Users\User\wahooMapsCreatorData\_download\land-polygons-split-4326\land_polygons.shp file needs to be downloaded
INFO:+ Need to download land polygons file
INFO:--------------------------------------------------------------------------------
INFO:# check countries .osm.pbf files
INFO:+ Checking for old maps and remove them
INFO:--------------------------------------------------------------------------------
INFO:# Downloading land_polygons.shp file
INFO:+ Downloaded: C:\Users\User\wahooMapsCreatorData\_download\land-polygons-split-4326\land_polygons.shp, took 29.412 s
INFO:--------------------------------------------------------------------------------
INFO:# Downloading malta-latest.osm.pbf file
INFO:+ Downloaded: C:\Users\User\wahooMapsCreatorData\_download\maps\malta-latest.osm.pbf, took 0.958 s
INFO:--------------------------------------------------------------------------------
INFO:# Filter tags from country osm.pbf files
INFO:+ Converting map of malta to o5m format
INFO:+ Filtering unwanted map objects out of map of malta
INFO:+ Filter tags from country osm.pbf files: OK, took 0.620 s
INFO:--------------------------------------------------------------------------------
INFO:# Generate land for each coordinate
INFO:+ (tile 1 of 2) Coordinates: 137,100
INFO:+ (tile 2 of 2) Coordinates: 138,100
INFO:+ Generate land for each coordinate: OK, took 8.176 s
INFO:--------------------------------------------------------------------------------
INFO:# Generate sea for each coordinate
INFO:+ (tile 1 of 2) Coordinates: 137,100
INFO:+ (tile 2 of 2) Coordinates: 138,100
INFO:+ Generate sea for each coordinate: OK, took 0.002 s
INFO:--------------------------------------------------------------------------------
INFO:# Split filtered country files to tiles
INFO:+ (tile 1 of 2) Coordinates: 137,100 / malta
INFO:+ (tile 2 of 2) Coordinates: 138,100 / malta
INFO:+ Split filtered country files to tiles: OK, took 2.471 s
INFO:--------------------------------------------------------------------------------
INFO:# Merge splitted tiles with land, elevation, and sea
INFO:+ (tile 1 of 2) Coordinates: 137,100
INFO:+ (tile 2 of 2) Coordinates: 138,100
INFO:+ Merge splitted tiles with land, elevation, and sea: OK, took 3.719 s
INFO:--------------------------------------------------------------------------------
INFO:# Creating .map files for tiles
INFO:+ (tile 1 of 2) Coordinates: 137,100
INFO:+ (tile 2 of 2) Coordinates: 138,100
Exception in thread Thread-35 (_readerthread):
Traceback (most recent call last):
  File "C:\Users\User\anaconda3\envs\gdal-user\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\User\anaconda3\envs\gdal-user\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\User\anaconda3\envs\gdal-user\lib\subprocess.py", line 1515, in _readerthread
    buffer.append(fh.read())
  File "C:\Users\User\anaconda3\envs\gdal-user\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 17: invalid start byte
INFO:+ Creating .map files for tiles: OK, took 4.179 s
INFO:--------------------------------------------------------------------------------
INFO:# Create: .map.lzma files
INFO:+ Country: malta
INFO:+ Copying .map.lzma tiles to output folders
INFO:+ Create .map.lzma files: OK, took 0.004 s
INFO:--------------------------------------------------------------------------------
INFO:# Total time 49.613 s

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions