I've been having several issues making GRASS algorithms work from the Processing toolbox.

When you fresh install QGIS 3.4 (MacOS High Sierra), first it doesn't find python -- which I solved by creating a custom PATH variable. Then it complains about inconsistent use of tabs and spaces, which I also solved by editing the grass74 file inside the QGIS app. Now I'm getting this error whatever GRASS algorithm I use:

WARNING: Default locale settings are missing. GRASS running with C locale.
Default locale not found, using UTF-8
Traceback (most recent call last):
File "/Applications/QGIS3.app/Contents/MacOS/grass/grass74", line 2029, in <module>
File "/Applications/QGIS3.app/Contents/MacOS/grass/grass74", line 1880, in main
File "/Applications/QGIS3.app/Contents/MacOS/grass/grass74", line 622, in set_paths
os.environ['MANPATH'] = sys_man_path
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 674, in __setitem__
value = self.encodevalue(value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not bytes

Right now I have Python 3.6.6 installed and QGIS 3.4.2 (the most recent 24Nov2018 release), but I've also tried with Python 3.6.5, Python 3.6.7, QGIS 3.0, 3.2, 3.3, 3.4.1... No good, same error.

I found people around here having similar problems (related to encoding) for Windows QGIS, which was solved but setting the Windows region to USA. Although my OS is in Portuguese, I'm using the QGIS in English and tried setting the OS to America region and English language, but the error persists.

Does anyone know anything about this?

  • There is a chance that some of the folders you are working with contains character unrecognizable using UTF-8? Like á, é, ñ, è ? Commented Nov 30, 2018 at 18:00
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
    – Vince
    Commented Nov 30, 2018 at 19:35
  • @guillermo_dangelo I thought it could be that, but I tested moving the files to a "character safe" folder and it didn't do it.
    – rubslopes
    Commented Dec 6, 2018 at 16:40

1 Answer 1


GRASS GIS 7.4 only works with Python 2. We are working on the update which is mostly done in the current development version GRASS GIS 7.7 (to become 7.8 stable then or even 8.0).

If possible for you, consider to update to GRASS GIS 7.6 which will be released soon (along with Python 2).

Edit Sep 2019:

GRASS GIS 7.8.0 with Python 3 support as been released:

  • ... but for use in QGIS you have to stick to the GRASS version that is supported by QGIS. So for now, a virtual box with QGIS 2.18 LTR inside might be the best choice.
    – AndreJ
    Commented Dec 1, 2018 at 7:53
  • 1
    QGIS searches for grass74, grass72, grass70 to my knowledge. So you could use a simple trick and install GRASS GIS 7.6 and create a link to grass74. The software is 99.9% compatible...
    – markusN
    Commented Dec 1, 2018 at 16:34
  • Not if you want the GRASS plugin under Ubuntu. Currently, the Ubuntugis version of QGIS 3.4.2 does not install it because Ubuntugis has recently upgraded to GRASS 7.4.3, and QGIS expects grass-core and grass742.
    – AndreJ
    Commented Dec 1, 2018 at 17:00
  • Strange, normally things should be in sync. In case worth a bug report there.
    – markusN
    Commented Dec 1, 2018 at 17:03
  • 1
    Is there any solution in 2019? Grass is not saving results in the output folder for me.
    – wondim
    Commented Jul 12, 2019 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.