[GRASS-user] t.rast.what does not accept utf8 in "where" field

Laurent C. lrntct at gmail.com
Thu Jun 15 08:48:23 PDT 2017


Hi Veronica,



2017-06-14 15:32 GMT-05:00 Veronica Andreo <veroandreo at gmail.com>:
> Hi Laurent,
>
> I might be mistaken, but I think the where is for the strds, so you should
> use one of the variables allowed/available in the twmporal framework...

You're right, It seems tobe related to the temporal DB. I thought it
was the spatial DB.
It could be an interesting addition, though.
However, it still have a problem with UTF8.

> and one more thing,  I would use double quotes after the where
> (where="name=='something'" or, if temporal, where="start_time
> =='2001-01-01'")? Have you tried that?
I did, without success. Actually, I wrote it the exact same way as in
v.db.select, and it worked.


Regards,
Laurent

>
> Best,
> Vero
>
>
> El 14 jun. 2017 5:03 p.m., "Laurent C." <lrntct at gmail.com> escribió:
>
> Hello,
>
> I'm running into a problem with t.rast.what when trying to select a
> specific point with the "where" option:
>
> /usr/lib/grass72/scripts/t.rast.what points=stations at chiapas
> strds=boqueron_60m_qy at chiapas_results where=name=='Boquerón'
> Traceback (most recent call last):
>   File "/usr/lib/grass72/scripts/t.rast.what", line 531, in
> <module>
>     main(options, flags)
>   File "/usr/lib/grass72/scripts/t.rast.what", line 169, in
> main
>     dbif=dbif)
>   File "/usr/lib/grass72/etc/python/grass/temporal/abstract_
> space_time_dataset.py", line 1411, in
> get_registered_maps_as_objects
>     rows = self.get_registered_maps(columns, where, order,
> dbif)
>   File "/usr/lib/grass72/etc/python/grass/temporal/abstract_
> space_time_dataset.py", line 1479, in get_registered_maps
>     sql += " AND (%s)" % (where.split(";")[0])
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in
> position 20: ordinal not in range(128)
>
> If I'm not setting "where", it works fine.
> When using the "where" option with v.db.select, I do not have this
> problem neither:
> v.db.select map=stations at chiapas where=name=='Boquerón'
> cat|name|rain_rate
> 9|Boquerón|0
>
> Should I open an issue?
>
> Best regards,
> Laurent
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
>


More information about the grass-user mailing list