[GRASS-dev] [GRASS GIS] #3446: GRASS python library is not working with python 3

GRASS GIS trac at osgeo.org
Mon Dec 10 16:23:56 PST 2018


#3446: GRASS python library is not working with python 3
---------------------+-----------------------------------------------
  Reporter:  lrntct  |      Owner:  grass-dev@…
      Type:  defect  |     Status:  new
  Priority:  major   |  Milestone:  7.8.0
 Component:  Python  |    Version:  7.2.1
Resolution:          |   Keywords:  python python3 ctypes, python 3.7
       CPU:  x86-64  |   Platform:  Linux
---------------------+-----------------------------------------------

Comment (by lucadelu):

 Replying to [comment:19 neteler]:
 > Now I have an issue with g.extension:
 >
 > {{{
 > GRASS 7.7.svn (utm32N):~ > python --version
 > Python 3.7.1
 >
 > GRASS 7.7.svn (utm32N):~ > g.extension i.fusion.hpf
 > Fetching <i.fusion.hpf> from GRASS GIS Addons repository (be patient)...
 > Traceback (most recent call last):
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/scripts/g.extension", line 1758, in <module>
 >     sys.exit(main())
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/scripts/g.extension", line 1737, in main
 >     install_extension(source=source, url=url, xmlurl=xmlurl)
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/scripts/g.extension", line 697, in install_extension
 >     source=source, url=url)
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/scripts/g.extension", line 1160, in install_extension_std_platforms
 >     outdev=outdev, directory=srcdir, tmpdir=TMPDIR)
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/scripts/g.extension", line 1113, in download_source_code
 >     fix_newlines(directory)
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/scripts/g.extension", line 1043, in fix_newlines
 >     if '\0' in data:
 > TypeError: a bytes-like object is required, not 'str'
 > }}}
 >
 > Likewise with other addon modules to be installed...

 I think most of the addons since they are mostly written for Python >= 2.6
 We need to port the addons to python3

 PS
 I think the Python3 support will required major release also to use the
 updated addons

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3446#comment:20>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list