danzig666 / qconsolidate3

Modified version of the QConsolidate/OQ-Consolidate plugin for QGIS 3+
GNU Affero General Public License v3.0
11 stars 4 forks source link

Problem when there is raster tile in project #12

Open saberraz opened 3 years ago

saberraz commented 3 years ago
Parse error at line 1, column 1:
             error occurred while parsing element
             Traceback (most recent call last):
              File "/home/saber/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qconsolidate3/consolidatethread.py", line 71, in run
              self.consolidate()
              File "/home/saber/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qconsolidate3/consolidatethread.py", line 96, in consolidate
              doc = self.loadProject()
              File "/home/saber/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qconsolidate3/consolidatethread.py", line 174, in loadProject
              raise SyntaxError(msg)
              File "", line None
             SyntaxError: Parse error at line 1, column 1:
             error occurred while parsing element
maspiers commented 3 years ago

I have basically the same error, but don't have any raster tiles in my project

2021-01-29T08:57:27 CRITICAL Parse error at line 1, column 1: error occurred while parsing element Traceback (most recent call last): File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qconsolidate3\consolidatethread.py", line 71, in run self.consolidate() File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qconsolidate3\consolidatethread.py", line 96, in consolidate doc = self.loadProject() File "C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qconsolidate3\consolidatethread.py", line 174, in loadProject raise SyntaxError(msg) File "", line None SyntaxError: Parse error at line 1, column 1: error occurred while parsing element

A .qgs file (it's actually a .qgz file with the wrong extension) is created but the Layers folder is empty.

eanema commented 4 months ago

I believe this is duplicate bug as seen in issue https://github.com/danzig666/qconsolidate3/issues/4 My solution is copy/pasted below

I have forked this repo and fixed this issue by extracting the .qgz file into the target directory. (I have also fixed a few other issues that are mentioned in the issues section)

There are not many code changes, but they can be see here: https://github.com/danzig666/qconsolidate3/compare/master...eanema:qconsolidate3:master

The forked repo is here: https://github.com/eanema/qconsolidate3