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

Veronica Andreo veroandreo at gmail.com
Wed Jun 14 13:32:17 PDT 2017


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... 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?

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170614/cd4d64a2/attachment.html>


More information about the grass-user mailing list