Re: [GRASS-dev] using libpath + ":" + in grass70 unsupported operand type
Yann Chemin wrote: > ~/grass_dev$ grass70 > Traceback (most recent call last): > File "/usr/local/bin/grass70", line 1267, in > load_env() > File "/usr/local/bin/grass70", line 753, in load_env > os.environ['LD_LIBRARY_PATH'] = libpath + ":" + isislibpath + ":" + > isis3rdparty > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > : is certainly not considered a string, but I cannot force it to be string > either... Any idea? The problem is that one of the variables (libpath, isislibpath, isis3rdparty) is None, and "None + str" isn't defined: > None + "hello" Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' -- Glynn Clements ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] using libpath + ":" + in grass70 unsupported operand type
Hi Vaclav, on my 64 bit machine, none of this happens. Will check back home tonight... Cheers, Yann On 25 November 2013 21:39, Vaclav Petras wrote: > > > > On Mon, Nov 25, 2013 at 10:55 AM, Yann Chemin wrote: > >> Hi, >> >> ~/grass_dev$ grass70 >> Traceback (most recent call last): >> File "/usr/local/bin/grass70", line 1267, in >> load_env() >> File "/usr/local/bin/grass70", line 753, in load_env >> os.environ['LD_LIBRARY_PATH'] = libpath + ":" + isislibpath + ":" + >> isis3rdparty >> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' >> >> : is certainly not considered a string, but I cannot force it to be >> string either... Any idea? >> >> > Hi Yann, > > I'm not sure if I understand your situation, anyway: > > My line 753 in lib/init/grass.py says: > > ... libpath + os.pathsep + isislibpath + os.pathsep + isis3rdparty > > os.pathsep is for sure type str as well as ":" literal is type str. > > I would say that one of libpath, isislibpath and isis3rdparty is None > although lines above seems that they sets everything. > > Can you debug your code? Simple print before line 753 should be enough: > > print libpath, isislibpath, isis3rdparty > > As far as I know, the print will not break the start up, so it should work. > > Vaclav > > Thanks >> >> -- >> >> >> ___ >> grass-dev mailing list >> grass-dev@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/grass-dev >> > > -- ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] using libpath + ":" + in grass70 unsupported operand type
On Mon, Nov 25, 2013 at 10:55 AM, Yann Chemin wrote: > Hi, > > ~/grass_dev$ grass70 > Traceback (most recent call last): > File "/usr/local/bin/grass70", line 1267, in > load_env() > File "/usr/local/bin/grass70", line 753, in load_env > os.environ['LD_LIBRARY_PATH'] = libpath + ":" + isislibpath + ":" + > isis3rdparty > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > : is certainly not considered a string, but I cannot force it to be string > either... Any idea? > > Hi Yann, I'm not sure if I understand your situation, anyway: My line 753 in lib/init/grass.py says: ... libpath + os.pathsep + isislibpath + os.pathsep + isis3rdparty os.pathsep is for sure type str as well as ":" literal is type str. I would say that one of libpath, isislibpath and isis3rdparty is None although lines above seems that they sets everything. Can you debug your code? Simple print before line 753 should be enough: print libpath, isislibpath, isis3rdparty As far as I know, the print will not break the start up, so it should work. Vaclav Thanks > > -- > > > ___ > grass-dev mailing list > grass-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-dev > ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev
[GRASS-dev] using libpath + ":" + in grass70 unsupported operand type
Hi, ~/grass_dev$ grass70 Traceback (most recent call last): File "/usr/local/bin/grass70", line 1267, in load_env() File "/usr/local/bin/grass70", line 753, in load_env os.environ['LD_LIBRARY_PATH'] = libpath + ":" + isislibpath + ":" + isis3rdparty TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' : is certainly not considered a string, but I cannot force it to be string either... Any idea? Thanks -- ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev