[GRASS-user] FreeBSD-Grass7 can't start

When try to launch Grass70, this appear :

Traceback (most recent call last):
  File "/usr/local/bin/grass70", line 1143, in <module>
    load_env()
  File "/usr/local/bin/grass70", line 659, in load_env
    if not os.access(grass_env_file, os.R_OK):
TypeError: coercing to Unicode: need string or buffer, NoneType found

Searched on the web but no solution found.
Anyone an idea ?

Hi,

2013/4/17 Pierre Stévens <pierre@geobsd.com>:

  File "/usr/local/bin/grass70", line 659, in load_env
    if not os.access(grass_env_file, os.R_OK):
TypeError: coercing to Unicode: need string or buffer, NoneType found

initial script needs to be updated for FreeBSD. In r55856, I added
warning for unsupported shell. In this case `bashrc` env file is used
by default.

What shell do you have [1]?

Martin

[1] http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py?rev=55856#L762

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

I use Z-Shell.

Next to your mail, I've edited '/usr/local/bin/grass70' :

1. Line 783 :
  elif sh="zsh":
    shellname = "Z Shell"

2. Line 792:
  elif sh in ['zsh']:
        grass_env_file = os.path.join(grass_config_dir, 'zshrc')

And Grass70 starts perfectly on FreeBSD with ZSH.

Thank you Martin.

Note : ZSH must be install from ports.
Hence, it is available from '/usr/local/bin/zsh'.
It's not the case with SH,CSH or TCSH which are located in '/bin/'.

The '/etc/shells' file lists all shells available on system.
Some ports (like GIT or ZSH) edit this file automatically.

On Wed, Apr 17, 2013 at 06:58:21PM +0200, Martin Landa wrote:

Hi,

2013/4/17 Pierre Stévens <pierre@geobsd.com>:
> File "/usr/local/bin/grass70", line 659, in load_env
> if not os.access(grass_env_file, os.R_OK):
> TypeError: coercing to Unicode: need string or buffer, NoneType found

initial script needs to be updated for FreeBSD. In r55856, I added
warning for unsupported shell. In this case `bashrc` env file is used
by default.

What shell do you have [1]?

Martin

[1] http://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py?rev=55856#L762

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Hi,

2013/4/18 Pierre Stévens <pierre@geobsd.com>:

I use Z-Shell.

Next to your mail, I've edited '/usr/local/bin/grass70' :

1. Line 783 :
        elif sh="zsh":
                shellname = "Z Shell"

2. Line 792:
        elif sh in ['zsh']:
        grass_env_file = os.path.join(grass_config_dir, 'zshrc')

And Grass70 starts perfectly on FreeBSD with ZSH.

thanks for the feedback. Z-shell added in r55897. Testing welcome. Martin