[GRASS-user] GRASS, ordinal not in range(128)

Hello, I’m trying to work with temporal series using GRASS GIS, but when I try to register maps an error occurs:

Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

I have five maps:

MODIS_2015250_h12v12
MODIS_2015251_h12v12
MODIS_2015252_h12v12
MODIS_2015253_h12v12
MODIS_2015254_h12v12

The secuence of commands is:

t.connect -d

t.create type=strds temporaltype=absolute output=ndvi title=“prueba ndvi” description=“prueba ndvi” semantictype=mean --o

t.register -i type=raster input=ndvi maps=g.list raster pattern="MODIS*" separator=comma start=“2015-09-07” increment=“1 days”

any ideas about how to solve it?

Thanks,

Andrés.

On Sat, Mar 11, 2017 at 9:49 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello, I'm trying to work with temporal series using GRASS GIS, but when I
try to register maps an error occurs:

Reuniendo información del mapa...
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
       in range(128)

Just wondering:
- which operating system do you use?
- given your name "Andrés" - do you have special characters in the path?

Best
Markus

Hello Markus

I’m working on Ubuntu 14.04 and the path is /home/andres/Escritorio/pruebas

Regards

···

2017-03-12 7:08 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Mar 11, 2017 at 9:49 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello, I’m trying to work with temporal series using GRASS GIS, but when I
try to register maps an error occurs:

Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

Just wondering:

  • which operating system do you use?
  • given your name “Andrés” - do you have special characters in the path?

Best
Markus

Hola Andres!
Bienvenido a la lista! I’m glad that you write here :slight_smile:

I regularly use t.register with MODIS products, and haven’t found that ERROR you describe. Moreover, I did some testing, just creating ad-hoc maps, creating the strds and then registering those maps and all went fine. I cannot reproduce the error that you get.

Here are my steps:

for i in seq 1 5 ; do r.mapcalc “prueba_andres${i} = 3” ; done
100%
100%
100%
100%
100%
GRASS 7.3.svn (latlong_wgs84):~ > t.create type=strds temporaltype=absolute output=ndvi_andres title=“NDVI prueba” description=“prueba tesis” semantictype=mean
GRASS 7.3.svn (latlong_wgs84):~ > t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=prueba_andres* separator=comma start=“2015-09-07” increment=“1 days”
Gathering map information…
100%
Registering maps in the temporal database…
Registering maps in the space time dataset…
Updating space time dataset…
100%

all fine…

Is there anything special with those maps you use, i.e: which processing have they gone through?
Maybe you could put them in a dropbox and share so someone else can access them and test

Cheers,
Vero

···

2017-03-12 12:01 GMT+01:00 Andres Solarte <e.andres.solartec@gmail.com>:

Hello Markus

I’m working on Ubuntu 14.04 and the path is /home/andres/Escritorio/pruebas

Regards


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

2017-03-12 7:08 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Mar 11, 2017 at 9:49 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello, I’m trying to work with temporal series using GRASS GIS, but when I
try to register maps an error occurs:

Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

Just wondering:

  • which operating system do you use?
  • given your name “Andrés” - do you have special characters in the path?

Best
Markus

Hello Vero

Thank you for your answer, I’m glad to be here too!

I followed your steps and I have the same problem :frowning:

GRASS 7.3.svn (prueba):~ > for i in seq 1 5 ; do r.mapcalc “prueba_andres${i} = 3” ; done
100%
100%
100%
100%
100%
GRASS 7.3.svn (prueba):~ > t.create type=strds temporaltype=absolute output=ndvi_andres title=“NDVI prueba” description=“prueba tesis” semantictype=mean
GRASS 7.3.svn (prueba):~ > t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=prueba_andres* separator=comma start=“2015-09-07” increment=“1 days”
Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

The dataset is available in the link below. The images were resampled but I think that’s not the problem :S

https://drive.google.com/open?id=0B5vy4w_s2kxmNXhnY0doYzQtN0E

Once again, thanks for your answer

Regards,

Andrés.

···

2017-03-15 4:49 GMT-03:00 Veronica Andreo <veroandreo@gmail.com>:

Hola Andres!
Bienvenido a la lista! I’m glad that you write here :slight_smile:

I regularly use t.register with MODIS products, and haven’t found that ERROR you describe. Moreover, I did some testing, just creating ad-hoc maps, creating the strds and then registering those maps and all went fine. I cannot reproduce the error that you get.

Here are my steps:

for i in seq 1 5 ; do r.mapcalc “prueba_andres${i} = 3” ; done
100%
100%
100%
100%
100%
GRASS 7.3.svn (latlong_wgs84):~ > t.create type=strds temporaltype=absolute output=ndvi_andres title=“NDVI prueba” description=“prueba tesis” semantictype=mean
GRASS 7.3.svn (latlong_wgs84):~ > t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=prueba_andres* separator=comma start=“2015-09-07” increment=“1 days”
Gathering map information…
100%
Registering maps in the temporal database…
Registering maps in the space time dataset…
Updating space time dataset…
100%

all fine…

Is there anything special with those maps you use, i.e: which processing have they gone through?
Maybe you could put them in a dropbox and share so someone else can access them and test

Cheers,
Vero

2017-03-12 12:01 GMT+01:00 Andres Solarte <e.andres.solartec@gmail.com>:

Hello Markus

I’m working on Ubuntu 14.04 and the path is /home/andres/Escritorio/pruebas

Regards


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

2017-03-12 7:08 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Mar 11, 2017 at 9:49 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello, I’m trying to work with temporal series using GRASS GIS, but when I
try to register maps an error occurs:

Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

Just wondering:

  • which operating system do you use?
  • given your name “Andrés” - do you have special characters in the path?

Best
Markus

Hola Andres,

I just tested with your data…
No issues here. As you say, it must be something else… but I have no hint… I’m sorry

Hope someone else can point you to a solution

un beso,

Vero

···

2017-03-15 12:59 GMT+01:00 Andres Solarte <e.andres.solartec@gmail.com>:

Hello Vero

Thank you for your answer, I’m glad to be here too!

I followed your steps and I have the same problem :frowning:

GRASS 7.3.svn (prueba):~ > for i in seq 1 5 ; do r.mapcalc “prueba_andres${i} = 3” ; done

100%
100%
100%
100%
100%

GRASS 7.3.svn (prueba):~ > t.create type=strds temporaltype=absolute output=ndvi_andres title=“NDVI prueba” description=“prueba tesis” semantictype=mean
GRASS 7.3.svn (prueba):~ > t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=prueba_andres* separator=comma start=“2015-09-07” increment=“1 days”

Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

The dataset is available in the link below. The images were resampled but I think that’s not the problem :S

https://drive.google.com/open?id=0B5vy4w_s2kxmNXhnY0doYzQtN0E

Once again, thanks for your answer

Regards,

Andrés.

2017-03-15 4:49 GMT-03:00 Veronica Andreo <veroandreo@gmail.com>:

Hola Andres!
Bienvenido a la lista! I’m glad that you write here :slight_smile:

I regularly use t.register with MODIS products, and haven’t found that ERROR you describe. Moreover, I did some testing, just creating ad-hoc maps, creating the strds and then registering those maps and all went fine. I cannot reproduce the error that you get.

Here are my steps:

for i in seq 1 5 ; do r.mapcalc “prueba_andres${i} = 3” ; done
100%
100%
100%
100%
100%
GRASS 7.3.svn (latlong_wgs84):~ > t.create type=strds temporaltype=absolute output=ndvi_andres title=“NDVI prueba” description=“prueba tesis” semantictype=mean
GRASS 7.3.svn (latlong_wgs84):~ > t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=prueba_andres* separator=comma start=“2015-09-07” increment=“1 days”
Gathering map information…
100%
Registering maps in the temporal database…
Registering maps in the space time dataset…
Updating space time dataset…
100%

all fine…

Is there anything special with those maps you use, i.e: which processing have they gone through?
Maybe you could put them in a dropbox and share so someone else can access them and test

Cheers,
Vero

2017-03-12 12:01 GMT+01:00 Andres Solarte <e.andres.solartec@gmail.com>:

Hello Markus

I’m working on Ubuntu 14.04 and the path is /home/andres/Escritorio/pruebas

Regards


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

2017-03-12 7:08 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Mar 11, 2017 at 9:49 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello, I’m trying to work with temporal series using GRASS GIS, but when I
try to register maps an error occurs:

Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

Just wondering:

  • which operating system do you use?
  • given your name “Andrés” - do you have special characters in the path?

Best
Markus

Hi,

On Wed, Mar 15, 2017 at 12:59 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:
...

GRASS 7.3.svn (prueba):~ > t.register -i type=raster input=ndvi_andres
maps=`g.list raster pattern=prueba_andres* separator=comma`
start="2015-09-07" increment="1 days"
Reuniendo información del mapa...
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
       in range(128)

two suggestions:
1. switch on the fly to English in the session, then run the last command again:

       export LANG=en_US
       export LANGUAGE=en_US
       export LC_MESSAGES=en_US
       t.register ...

2. if that also fails, change the debug level with

g.gisenv set=DEBUG=1 # or 2 or 3 ...
t.register ...
g.gisenv set=DEBUG=0

and see if you can find out from the output where it roughly happens.

best
Markus

Hello Markus,

the first suggestion solved the problem

thank you so much, now it works :slight_smile:

Gracias Vero también a vos!!!

Regards,

Andrés.

···

2017-03-17 16:37 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

Hi,

On Wed, Mar 15, 2017 at 12:59 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

GRASS 7.3.svn (prueba):~ > t.register -i type=raster input=ndvi_andres
maps=g.list raster pattern=prueba_andres* separator=comma
start=“2015-09-07” increment=“1 days”
Reuniendo información del mapa…
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

two suggestions:

  1. switch on the fly to English in the session, then run the last command again:

export LANG=en_US
export LANGUAGE=en_US
export LC_MESSAGES=en_US
t.register …

  1. if that also fails, change the debug level with

g.gisenv set=DEBUG=1 # or 2 or 3 …
t.register …
g.gisenv set=DEBUG=0

and see if you can find out from the output where it roughly happens.

best
Markus

Le Sat, 18 Mar 2017 11:53:48 -0300,
Andres Solarte <e.andres.solartec@gmail.com> a écrit :

Hello Markus,

the first suggestion solved the problem

This sounds like there might be some issue handling the translation.
Probably warrants a bug report.

Moritz

thank you so much, now it works :slight_smile:

Gracias Vero también a vos!!!

Regards,

Andrés.

2017-03-17 16:37 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

> Hi,
>
> On Wed, Mar 15, 2017 at 12:59 PM, Andres Solarte
> <e.andres.solartec@gmail.com> wrote:
> ...
> > GRASS 7.3.svn (prueba):~ > t.register -i type=raster
> > input=ndvi_andres maps=`g.list raster pattern=prueba_andres*
> > separator=comma` start="2015-09-07" increment="1 days"
> > Reuniendo información del mapa...
> > ERROR: ascii,Definir tiempo absoluto válido para mapa
> > <,25,26,ordinal not in range(128)
>
>
> two suggestions:
> 1. switch on the fly to English in the session, then run the last
> command again:
>
> export LANG=en_US
> export LANGUAGE=en_US
> export LC_MESSAGES=en_US
> t.register ...
>
> 2. if that also fails, change the debug level with
>
> g.gisenv set=DEBUG=1 # or 2 or 3 ...
> t.register ...
> g.gisenv set=DEBUG=0
>
> and see if you can find out from the output where it roughly
> happens.
>
> best
> Markus
>

[Please keep discussions on the list]

Le Sun, 19 Mar 2017 19:27:28 -0300,
Luiz Andrade <lcoandrade@gmail.com> a écrit :

Well, normally this is a problem when GRASS finds special characters
(e.g. á, é, à, ã, etc). Check your strings for those characters and
remove them.

The problem here does not seem to be with file or path names as
everything works when the locale is set to en_US.

So there seems to be an issue when a different locale is used. This is
not something the user can handle, but is in the code.

Moritz

Regards,
Luiz Claudio

> Em 19 de mar de 2017, à(s) 09:42, Moritz Lennert
> <mlennert@club.worldonline.be> escreveu:
>
> Le Sat, 18 Mar 2017 11:53:48 -0300,
> Andres Solarte <e.andres.solartec@gmail.com> a écrit :
>
>> Hello Markus,
>>
>> the first suggestion solved the problem
>
> This sounds like there might be some issue handling the translation.
> Probably warrants a bug report.
>
> Moritz
>
>>
>> thank you so much, now it works :slight_smile:
>>
>> Gracias Vero también a vos!!!
>>
>> Regards,
>>
>> Andrés.
>>
>>
>> 2017-03-17 16:37 GMT-03:00 Markus Neteler <neteler@osgeo.org>:
>>
>>> Hi,
>>>
>>> On Wed, Mar 15, 2017 at 12:59 PM, Andres Solarte
>>> <e.andres.solartec@gmail.com> wrote:
>>> ...
>>>> GRASS 7.3.svn (prueba):~ > t.register -i type=raster
>>>> input=ndvi_andres maps=`g.list raster pattern=prueba_andres*
>>>> separator=comma` start="2015-09-07" increment="1 days"
>>>> Reuniendo información del mapa...
>>>> ERROR: ascii,Definir tiempo absoluto válido para mapa
>>>> <,25,26,ordinal not in range(128)
>>>
>>>
>>> two suggestions:
>>> 1. switch on the fly to English in the session, then run the last
>>> command again:
>>>
>>> export LANG=en_US
>>> export LANGUAGE=en_US
>>> export LC_MESSAGES=en_US
>>> t.register ...
>>>
>>> 2. if that also fails, change the debug level with
>>>
>>> g.gisenv set=DEBUG=1 # or 2 or 3 ...
>>> t.register ...
>>> g.gisenv set=DEBUG=0
>>>
>>> and see if you can find out from the output where it roughly
>>> happens.
>>>
>>> best
>>> Markus
>>>
>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, Mar 20, 2017 at 11:12 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

[Please keep discussions on the list]

Le Sun, 19 Mar 2017 19:27:28 -0300,
Luiz Andrade <lcoandrade@gmail.com> a écrit :

Well, normally this is a problem when GRASS finds special characters
(e.g. á, é, à, ã, etc). Check your strings for those characters and
remove them.

The problem here does not seem to be with file or path names as
everything works when the locale is set to en_US.

So there seems to be an issue when a different locale is used. This is
not something the user can handle, but is in the code.

It would really help if you could change the debug level with

g.gisenv set=DEBUG=1 # or 2 or 3 ...

and then run

t.register ...

to see in the output where the problem roughly happens.

To switch back to "debug silence", run then:

g.gisenv set=DEBUG=0

Markus

Ok, but I changed the language on ubuntu. It solved the problem.

Enviado desde mi smartphone BlackBerry 10.
Mensaje original
De: Markus Neteler
Enviado: lunes, 20 de marzo de 2017 23:24
Para: Moritz Lennert
CC: grass-user@lists.osgeo.org
Asunto: Re: [GRASS-user] GRASS, ordinal not in range(128)

On Mon, Mar 20, 2017 at 11:12 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

[Please keep discussions on the list]

Le Sun, 19 Mar 2017 19:27:28 -0300,
Luiz Andrade <lcoandrade@gmail.com> a écrit :

Well, normally this is a problem when GRASS finds special characters
(e.g. á, é, à, ã, etc). Check your strings for those characters and
remove them.

The problem here does not seem to be with file or path names as
everything works when the locale is set to en_US.

So there seems to be an issue when a different locale is used. This is
not something the user can handle, but is in the code.

It would really help if you could change the debug level with

g.gisenv set=DEBUG=1 # or 2 or 3 ...

and then run

t.register ...

to see in the output where the problem roughly happens.

To switch back to "debug silence", run then:

g.gisenv set=DEBUG=0

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Le 21 mars 2017 04:38:11 GMT+01:00, Andres Solarte <e.andres.solartec@gmail.com> a écrit :

Ok, but I changed the language on ubuntu. It solved the problem.

Yes. Could you change it back to what it was and then run the command in debug mode as suggested by Markus ?

Moritz

Enviado desde mi smartphone BlackBerry 10.
Mensaje original
De: Markus Neteler
Enviado: lunes, 20 de marzo de 2017 23:24
Para: Moritz Lennert
CC: grass-user@lists.osgeo.org
Asunto: Re: [GRASS-user] GRASS, ordinal not in range(128)

On Mon, Mar 20, 2017 at 11:12 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

[Please keep discussions on the list]

Le Sun, 19 Mar 2017 19:27:28 -0300,
Luiz Andrade <lcoandrade@gmail.com> a écrit :

Well, normally this is a problem when GRASS finds special characters
(e.g. á, é, à, ã, etc). Check your strings for those characters and
remove them.

The problem here does not seem to be with file or path names as
everything works when the locale is set to en_US.

So there seems to be an issue when a different locale is used. This

is

not something the user can handle, but is in the code.

It would really help if you could change the debug level with

g.gisenv set=DEBUG=1 # or 2 or 3 ...

and then run

t.register ...

to see in the output where the problem roughly happens.

To switch back to "debug silence", run then:

g.gisenv set=DEBUG=0

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Hello,

I changed the debug level as Markus suggested

g.gisenv set=DEBUG=1

this is the result

t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=MODIS* separator=comma start=“2015-09-07” increment=“1 days”
D1/1: G_set_program_name(): g.list
D1/1: G_set_program_name(): t.register
D1/1: G_set_program_name(): g.gisenv
D1/1: grass.script.core.start_command(): t.connect -c
D1/1: G_set_program_name(): t.connect
D1/1: grass.script.core.start_command(): g.gisenv -n
D1/1: G_set_program_name(): g.gisenv
D1/1: Start messenger server
D1/1: Initiate the temporal database
D1/1: Start C-interface server
D1/1: Checking mapset
D1/1: Checking mapset
D1/1: c_library_server._available_mapsets:
mapset: prueba
has permission 1
in search path: 1
D1/1: c_library_server._available_mapsets:
mapset: PERMANENT
has permission 1
in search path: 1
D1/1: Checking mapset
D1/1: Checking mapset
D1/1: get_available_temporal_mapsets:
mapset prueba
driver sqlite
database /home/andres/Escritorio/PRUEBAQGIS/Prueba/prueba/tgis/sqlite.db
D1/1: Checking mapset
D1/1: Checking mapset
D1/1: get_available_temporal_mapsets:
mapset PERMANENT
driver None
database None
D1/1: DBConnection constructor:
backend: sqlite
dbstring: /home/andres/Escritorio/PRUEBAQGIS/Prueba/prueba/tgis/sqlite.db
D1/1: c_library_server._available_mapsets:
mapset: prueba
has permission 1
in search path: 1
D1/1: c_library_server._available_mapsets:
mapset: PERMANENT
has permission 1
in search path: 1
D1/1: Checking mapset
D1/1: Checking mapset
D1/1: Checking mapset
D1/1: get_available_temporal_mapsets:
mapset prueba
driver sqlite
database /home/andres/Escritorio/PRUEBAQGIS/Prueba/prueba/tgis/sqlite.db
D1/1: Checking mapset
D1/1: get_available_temporal_mapsets:
mapset PERMANENT
driver None
database None
D1/1: DBConnection constructor:
backend: sqlite
dbstring: /home/andres/Escritorio/PRUEBAQGIS/Prueba/prueba/tgis/sqlite.db
Reuniendo información del mapa…
D1/1: G_find_raster(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: grass.script.core.start_command(): g.message -e message=ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not in range(128)
D1/1: G_set_program_name(): g.message
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)
D1/1: Stop messenger server
D1/1: G_set_program_name(): g.gisenv

Regards

Andrés.

···

2017-03-21 5:22 GMT-03:00 Moritz Lennert <mlennert@club.worldonline.be>:

Le 21 mars 2017 04:38:11 GMT+01:00, Andres Solarte <e.andres.solartec@gmail.com> a écrit :

Ok, but I changed the language on ubuntu. It solved the problem.

Yes. Could you change it back to what it was and then run the command in debug mode as suggested by Markus ?

Moritz

Enviado desde mi smartphone BlackBerry 10.
Mensaje original
De: Markus Neteler
Enviado: lunes, 20 de marzo de 2017 23:24
Para: Moritz Lennert
CC: grass-user@lists.osgeo.org
Asunto: Re: [GRASS-user] GRASS, ordinal not in range(128)

On Mon, Mar 20, 2017 at 11:12 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

[Please keep discussions on the list]

Le Sun, 19 Mar 2017 19:27:28 -0300,
Luiz Andrade <lcoandrade@gmail.com> a écrit :

Well, normally this is a problem when GRASS finds special characters
(e.g. á, é, à, ã, etc). Check your strings for those characters and
remove them.

The problem here does not seem to be with file or path names as
everything works when the locale is set to en_US.

So there seems to be an issue when a different locale is used. This
is
not something the user can handle, but is in the code.

It would really help if you could change the debug level with

g.gisenv set=DEBUG=1 # or 2 or 3 …

and then run

t.register …

to see in the output where the problem roughly happens.

To switch back to “debug silence”, run then:

g.gisenv set=DEBUG=0

Markus


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Hi,

On Tue, Mar 21, 2017 at 3:13 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello,

I changed the debug level as Markus suggested

g.gisenv set=DEBUG=1

this is the result

good, we are getting closer...:

t.register -i type=raster input=ndvi_andres maps=`g.list raster
pattern=MODIS* separator=comma` start="2015-09-07" increment="1 days"

...

D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: grass.script.core.start_command(): g.message -e message=ascii,Definir
tiempo absoluto válido para mapa <,25,26,ordinal not in range(128)
D1/1: G_set_program_name(): g.message
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
       in range(128)

In the locale/po/grasslibs_es.po file there is the mention of the
corresponding source code lines:

#: ../lib/python/temporal/register.py:422
#, python-format
msgid ""
"Set absolute valid time for map <%(id)s> with layer %(layer)s to %(start)s - "
"%(end)s"
msgstr ""
"Definir tiempo absoluto válido para mapa <%(id)s> con capa %(layer)s en "
"%(start)s - %(end)s"

#: ../lib/python/temporal/register.py:427
#, python-format
msgid "Set absolute valid time for map <%s> to %s - %s"
msgstr "Definir tiempo absoluto válido para mapa <%s> en %s - %s"

Probably a Python issue there in reading the "á" of "válido"?

Markus

Hello,

I’m working with grass72, I modified the /usr/lib/grass72/locale/es/LC_MESSAGES/grasslibs.mo file by deleting the accents and it works, so, maybe is a Python issue as you say.

···

2017-03-21 18:05 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

Hi,

On Tue, Mar 21, 2017 at 3:13 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello,

I changed the debug level as Markus suggested

g.gisenv set=DEBUG=1

this is the result

good, we are getting closer…:

t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=MODIS* separator=comma start=“2015-09-07” increment=“1 days”

D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: grass.script.core.start_command(): g.message -e message=ascii,Definir
tiempo absoluto válido para mapa <,25,26,ordinal not in range(128)
D1/1: G_set_program_name(): g.message
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

In the locale/po/grasslibs_es.po file there is the mention of the
corresponding source code lines:

#: …/lib/python/temporal/register.py:422
#, python-format
msgid “”
"Set absolute valid time for map <%(id)s> with layer %(layer)s to %(start)s - "
“%(end)s”
msgstr “”
"Definir tiempo absoluto válido para mapa <%(id)s> con capa %(layer)s en "
“%(start)s - %(end)s”

#: …/lib/python/temporal/register.py:427
#, python-format
msgid “Set absolute valid time for map <%s> to %s - %s”
msgstr “Definir tiempo absoluto válido para mapa <%s> en %s - %s”

Probably a Python issue there in reading the “á” of “válido”?

Markus

Hello,

I made two changes for this issue.

  1. In the file …etc/python/grass/temporal/register.py (line 422 for me), I added the marked in red

else:
msgr.debug(1, _((“Set absolute valid time for map <%s> to %s - %s”)
% (map.get_map_id(), str(start_time), str(end_time))).encode(‘utf8’))

There is a similar issue after that, so I added the marked in red in the file
…etc/python/grass/temporal/abstract_space_time_dataset.py (line 2282)

self.msgr.verbose(_((“Update metadata, spatial and temporal extent from”
" all registered maps of <%s>") % (self.get_id())).encode(‘utf8’))

Now, I don’t have problems with accents

t.info input=ndvi_andres@regresion
±------------------- Space Time Raster Dataset -----------------------------+

±------------------- Basic information -------------------------------------+

Id: … ndvi_andres@regresion
Name: … ndvi_andres
Mapset: … regresion
Creator: … andres
Temporal type: … absolute
Creation time: … 2017-03-22 15:58:33.237769
Modification time:… 2017-03-22 15:58:40.516887
Semantic type:… mean
±------------------- Absolute time -----------------------------------------+
Start time:… 2015-09-07 00:00:00
End time:… 2015-09-12 00:00:00
Granularity:… 1 day
Temporal type of maps:… interval
±------------------- Spatial extent ----------------------------------------+
North:… 1.0
South:… -41.0
East:… … 1.6756
West:… -78.3244
Top:… 0.0
Bottom:… 0.0
±------------------- Metadata information ----------------------------------+

···

2017-03-22 14:47 GMT-03:00 Andres Solarte <e.andres.solartec@gmail.com>:

Hello,

I’m working with grass72, I modified the /usr/lib/grass72/locale/es/LC_MESSAGES/grasslibs.mo file by deleting the accents and it works, so, maybe is a Python issue as you say.

2017-03-21 18:05 GMT-03:00 Markus Neteler <neteler@osgeo.org>:

Hi,

On Tue, Mar 21, 2017 at 3:13 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello,

I changed the debug level as Markus suggested

g.gisenv set=DEBUG=1

this is the result

good, we are getting closer…:

t.register -i type=raster input=ndvi_andres maps=g.list raster pattern=MODIS* separator=comma start=“2015-09-07” increment=“1 days”

D1/1: G_find_raster2(): name=MODIS_2015250_h12v12_1km_NDVI mapset=prueba
D1/1: grass.script.core.start_command(): g.message -e message=ascii,Definir
tiempo absoluto válido para mapa <,25,26,ordinal not in range(128)
D1/1: G_set_program_name(): g.message
ERROR: ascii,Definir tiempo absoluto válido para mapa <,25,26,ordinal not
in range(128)

In the locale/po/grasslibs_es.po file there is the mention of the
corresponding source code lines:

#: …/lib/python/temporal/register.py:422
#, python-format
msgid “”
"Set absolute valid time for map <%(id)s> with layer %(layer)s to %(start)s - "
“%(end)s”
msgstr “”
"Definir tiempo absoluto válido para mapa <%(id)s> con capa %(layer)s en "
“%(start)s - %(end)s”

#: …/lib/python/temporal/register.py:427
#, python-format
msgid “Set absolute valid time for map <%s> to %s - %s”
msgstr “Definir tiempo absoluto válido para mapa <%s> en %s - %s”

Probably a Python issue there in reading the “á” of “válido”?

Markus

On Wed, Mar 22, 2017 at 8:21 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello,

I made two changes for this issue.

1. In the file ...etc/python/grass/temporal/register.py (line 422 for me), I
added the marked in red

else:
   msgr.debug(1, _(("Set absolute valid time for map <%s> to %s - %s")
                       % (map.get_map_id(), str(start_time),
str(end_time))).encode('utf8'))

well, msgr.debug() should not have the _() macro at all.
Debug should not go into translations.

There is a similar issue after that, so I added the marked in red in the
file
...etc/python/grass/temporal/abstract_space_time_dataset.py (line 2282)

self.msgr.verbose(_(("Update metadata, spatial and temporal extent from"
                            " all registered maps of <%s>") %
(self.get_id())).encode('utf8'))

.. this one is of course eligible.

Now, I don't have problems with accents

Thanks for checking!
To be fixed by our Python gurus in SVN :slight_smile:

Markus

Hello,

I just discover this thread. It seems to be the same issue I've
reported two months ago:

https://trac.osgeo.org/grass/ticket/3338

Best regards,
Laurent

2017-03-22 16:44 GMT-06:00 Markus Neteler <neteler@osgeo.org>:

On Wed, Mar 22, 2017 at 8:21 PM, Andres Solarte
<e.andres.solartec@gmail.com> wrote:

Hello,

I made two changes for this issue.

1. In the file ...etc/python/grass/temporal/register.py (line 422 for me), I
added the marked in red

else:
   msgr.debug(1, _(("Set absolute valid time for map <%s> to %s - %s")
                       % (map.get_map_id(), str(start_time),
str(end_time))).encode('utf8'))

well, msgr.debug() should not have the _() macro at all.
Debug should not go into translations.

There is a similar issue after that, so I added the marked in red in the
file
...etc/python/grass/temporal/abstract_space_time_dataset.py (line 2282)

self.msgr.verbose(_(("Update metadata, spatial and temporal extent from"
                            " all registered maps of <%s>") %
(self.get_id())).encode('utf8'))

.. this one is of course eligible.

Now, I don't have problems with accents

Thanks for checking!
To be fixed by our Python gurus in SVN :slight_smile:

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user