Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong default extension picked for table outputs #24045

Closed
qgib opened this issue Jan 30, 2017 · 12 comments
Closed

Wrong default extension picked for table outputs #24045

qgib opened this issue Jan 30, 2017 · 12 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 30, 2017

Author Name: matteo ghetta (@ghtmtt)
Original Redmine Issue: 16133
Affected QGIS version: master
Redmine category:processing/qgis
Assignee: Victor Olaya


By default Processing assigns ".dbf" extension to table outputs, while actually it creates ".csv" files. This causes problem with loading output after algorithm execution. If output saved to the file with correct extension there are no error.

@qgib
Copy link
Contributor Author

qgib commented Jan 31, 2017

Author Name: Victor Olaya (@volaya)


Two questions:

Does the mentioned layer file exist and can be opened manually from QGIS?

Does this happen with other algorithms that generate tables?

It might be an error fo the algorithm itself, or a more generic thing affecting table outputs

@qgib
Copy link
Contributor Author

qgib commented Jan 31, 2017

Author Name: matteo ghetta (@ghtmtt)


Does the mentioned layer file exist and can be opened manually from QGIS?

yes, they exist. In fact, I tried the algorithm with some custom test data of processing (points, polys) and other standard shapefiles with I can normally work (other algorithms works fine)

Does this happen with other algorithms that generate tables?

I guess you are right. The algorithm Statistics by categories gives the same error.

BTW: I tried the same algorithms in 2.18 (same input layer) and they work just fine

Can I help in other ways?

Thanks!

@qgib
Copy link
Contributor Author

qgib commented Feb 8, 2017

Author Name: Alexander Bruy (@alexbruy)


Well, all algorithms that produce table output work like a charm.

They fail only if output saved to the temporary file. And fail because temporary file uses wrong extension by default: ".dbf" instead of ".csv".


  • subject was changed from Processing Frequency Analysis fails to Wrong default extension picked for table outputs
  • operating_system was changed from Linux Mint to
  • os_version was changed from 18 to

@qgib
Copy link
Contributor Author

qgib commented Feb 14, 2017

Author Name: matteo ghetta (@ghtmtt)


Ok, I see that the algorithm works fine if the file is saved somewhere else.

But, how to deal with temporary tables? Should we not consider this a bug?

Thanks

@qgib
Copy link
Contributor Author

qgib commented Mar 7, 2017

Author Name: Giovanni Manghi (@gioman)


In master "statistics by category" does not work regardless if the output is temporary or if the user chooses a location on disk. The tool works fine on 2.18.4. Maybe other tools are affected on master(?).

2017-03-07T11:25:25 2 Error loading result layer:
Traceback (most recent call last):
File "C:/PROGRA1/QGIS21.99/apps/qgis-dev/./python/plugins\processing\gui\Postprocessing.py", line 75, in handleAlgorithmResults
out.name))
File "C:/PROGRA1/QGIS21.99/apps/qgis-dev/./python/plugins\processing\tools\dataobjects.py", line 223, in load
+ '
Check the processing framework log to look for errors')
RuntimeError: Could not load layer: C:\Users\qgis\AppData\Local\Temp\processing9b7c26fa6fda4188a46f914f4dfd4639\5f1c58d71ff441f68b534f00dbf467bd\OUTPUT.dbf
Check the processing framework log to look for errors

2017-03-07T11:25:45 2 Error loading result layer:
Traceback (most recent call last):
File "C:/PROGRA1/QGIS21.99/apps/qgis-dev/./python/plugins\processing\gui\Postprocessing.py", line 75, in handleAlgorithmResults
out.name))
File "C:/PROGRA1/QGIS21.99/apps/qgis-dev/./python/plugins\processing\tools\dataobjects.py", line 223, in load
+ '
Check the processing framework log to look for errors')
RuntimeError: Could not load layer: C:/Users/qgis/Desktop/dede.dbf
Check the processing framework log to look for errors


  • fixed_version_id was changed from Future Release - High Priority to Version 3.0
  • priority_id was changed from High to Severe/Regression

@qgib
Copy link
Contributor Author

qgib commented Apr 28, 2017

Author Name: Arnaud Morvan (@arnaud-morvan)


This seems to have been introduced by #dfb4cdd34b93d0d05ce94a842a4cf871c5a900fd
(changed default extension from .csv to .dbf in OutputTable class)

I also note this the TableWriter add a .csv extension if it is not there.

So the file is really created with .dbf.csv extension and the ouput value is not updated.

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 1

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Severe/Regression to High

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Oct 30, 2017

Author Name: Nyall Dawson (@nyalldawson)


Should no longer be an issue on master - we now use proper layers instead of the old table outputs, so format/extension is any valid vector format.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 31, 2017

Author Name: matteo ghetta (@ghtmtt)


Confirmed. I think we can close this issue. Thanks

@qgib
Copy link
Contributor Author

qgib commented Oct 31, 2017

Author Name: Nyall Dawson (@nyalldawson)


  • resolution was changed from to fixed/implemented
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Oct 31, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore labels May 25, 2019
@qgib qgib added this to the Version 3.0 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant