[Ubuntu] r.in.wms failing with GRASS 7.8.0

Luí­s Moreira de Sousa luis.de.sousa at protonmail.ch
Wed Nov 27 00:54:24 PST 2019


Hi all,

the error message below is happening with GRASS 7.8.0 installed from the stable PPA on Ubuntu 18.04. It is a type mismatch exception from Python, happens with services from MapServer, all of which QGis can digest correctly. Could this be related to packaging? Or is it a bug with GRASS itself?

Thank you.

> r.in.wms url="https://maps.isric.org/mapserv?map=/map/soc.map" layer=soc_0-5cm_mean  output=soc_0-5cm_mean srs=152160 format=png password="s3cret" username="user"
Downloading data from WMS server...
Traceback (most recent call last):
  File "/usr/lib/python3.6/base64.py", line 510, in _input_type_check
    m = memoryview(s)
TypeError: memoryview: a bytes-like object is required, not 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/grass78/scripts/r.in.wms", line 267, in <module>
    sys.exit(main())
  File "/usr/lib/grass78/scripts/r.in.wms", line 253, in main
    fetched_map = wms.GetMap(options, flags)
  File "/usr/lib/grass78/etc/r.in.wms/wms_base.py", line 214, in GetMap
    self.temp_map = self._download()
  File "/usr/lib/grass78/etc/r.in.wms/wms_drv.py", line 69, in _download
    self.cap_file = self._fetchCapabilities(self.params)
  File "/usr/lib/grass78/etc/r.in.wms/wms_base.py", line 246, in _fetchCapabilities
    cap = self._fetchDataFromServer(cap_url, options['username'], options['password'])
  File "/usr/lib/grass78/etc/r.in.wms/wms_base.py", line 271, in _fetchDataFromServer
    base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
  File "/usr/lib/python3.6/base64.py", line 540, in encodestring
    return encodebytes(s)
  File "/usr/lib/python3.6/base64.py", line 527, in encodebytes
    _input_type_check(s)
  File "/usr/lib/python3.6/base64.py", line 513, in _input_type_check
    raise TypeError(msg) from err
TypeError: expected bytes-like object, not str

--
Luís
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/ubuntu/attachments/20191127/9da10080/attachment.html>


More information about the Ubuntu mailing list