[GRASS-dev] [GRASS GIS] #4023: TypeError: a bytes-like object is required, not 'str'

GRASS GIS trac at osgeo.org
Thu Jan 23 00:30:59 PST 2020


#4023: TypeError: a bytes-like object is required, not 'str'
------------------------+-------------------------
 Reporter:  pvanbosgeo  |      Owner:  grass-dev@…
     Type:  defect      |     Status:  new
 Priority:  normal      |  Milestone:
Component:  Default     |    Version:  unspecified
 Keywords:              |        CPU:  Unspecified
 Platform:  MSWindows   |
------------------------+-------------------------
 Running the addon r.diversity on grass 7.9 (Windows 10), I get the
 following error:

 {{{

 C:\Users\hsc\Documents\GRASSGIS\scripts\r.diversity.py --overwrite
 input=landschap at datamodel prefix=renyi3 alpha=0.6 method=renyi
 Traceback (most recent call last):
   File
 "C:\Users\hsc\Documents\GRASSGIS\scripts\r.diversity.py",
 line 283, in <module>
     sys.exit(main())
   File
 "C:\Users\hsc\Documents\GRASSGIS\scripts\r.diversity.py",
 line 149, in main
     quiet, overwrite)
   File
 "C:\Users\hsc\Documents\GRASSGIS\scripts\r.diversity.py",
 line 160, in calculateM
     createConfFile(r, map_in, home)
   File
 "C:\Users\hsc\Documents\GRASSGIS\scripts\r.diversity.py",
 line 240, in createConfFile
     fileConf.writelines(outputLine)
 TypeError: a bytes-like object is required, not 'str'
 (Wed Jan 22 12:02:17 2020) Command finished (3 sec)

 }}}

 I guess something to do with Python2 vs Python 3 (using the latter), but I
 can't pin it down.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/4023>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list