Comments (5)
Hey @petrasovaa,
I tried a fix in commit 9bca4e0 that works on my computer. Also, I improved the manual page a bit. Could you check again on your side if it runs as expected ?
from grass-addons.
I tested the examples and yes, those work, thank you! In addition though I tested these (without the csvfile option):
r.zonal.classes zone_map=zipcodes raster=landuse96_28m vectormap=vect_output classes_list='4,12,1234' --o
resulting in
r.stats command finished...
Creating output vector map...
DBMI-SQLite driver error:
Error in sqlite3_prepare():
table rzonalclasses_tmp_vect_32080 has 19 columns but 18 values were supplied
DBMI-SQLite driver error:
Error in sqlite3_prepare():
table rzonalclasses_tmp_vect_32080 has 19 columns but 18 values were supplied
ERROR: Error while executing: 'INSERT INTO rzonalclasses_tmp_vect_32080
VALUES
(18,9e-05,0.11286,0.07422,0.00000,0.0231,0.00000,0.0549,0.00000,0.00000,0.05871,0.02337,0.00000,0.29982,0.35147,0.00146,0.00000,0.00000)'
Traceback (most recent call last):
File "/home/anna/.grass7/addons/scripts/r.zonal.classes", line 316, in <module>
main()
File "/home/anna/.grass7/addons/scripts/r.zonal.classes", line 309, in main
gscript.run_command('db.execute', input=insert_sql, quiet=True)
File "/home/anna/dev/grass/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 499, in run_command
return handle_errors(returncode, result=None, args=args, kwargs=kwargs)
File "/home/anna/dev/grass/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 392, in handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run db.execute db.execute --q input=/home/anna/grassdata/nc_spm_08_grass7/anna/.tmp/pop-os/32080.1 ended with error
from grass-addons.
One more thing, the code is works only with Python3 due to:
with open(csvfile, 'w', newline='') as outfile:
newline is not in Python2. It's up to you if you care about that I guess.
from grass-addons.
The bug on INSERT sql statement is fixed now since 47ec9c7.
For the Python 2 compatibility, I guess it is relevant to keep it as now since it is not supported anymore.
Thanks for testing this add-on ;) If you consider the issue over, feel free to close the discussion...
from grass-addons.
Thank you!
from grass-addons.
Related Issues (20)
- [Bug] i.fusion.hpf can longer be installed with g.extension HOT 5
- v.db.pyupdate warning during installation
- [Feat] i.sentinel.import: handle processing baselines HOT 3
- [Bug] Add concurrency groups/cancel in progress for skipping outdated CI runs
- Add tests to i.modis, i.landsat, i.sentinel download HOT 23
- [Bug] r.niche.similarity: error when running the module
- r.hydro.flatten: separate footprint of the impoundment from the downstream river
- Dependency Dashboard
- [Bug] Installing v.kriging fails HOT 2
- [Bug] r.fuzzy.set rounds shape/converts parameter decimal value to 0 HOT 6
- [Bug] v.surf.nnbathy: NameError: `StandardError` is not defined HOT 8
- Add per-test timeout for grass.gunittest tests
- Require the tests to pass in CI
- v.rast.move: empty keywords break addon overview script HOT 2
- [Bug] i.sentinel.download: give warning instead of errors if single files are corrupt
- v.surf.mass: Input should be vector "area" map? HOT 1
- [Bug] testsuite: do not run tests for deprecated module HOT 4
- [Bug] m.tnm.download and m.cdo.download fail to build on Windows server due to using external Python library requests
- r.stream.distance elevations with value of -1 [Bug]
- [Bug] Remove r.sim.water.mp from addons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grass-addons.