Error QgsOfflineEditing - object has no attribute 'convert_to_offline' when downloading the project with qfield on android.
Forstrevier opened this issue · comments
- qfc downgraded to version v0.23.0 (with newer qfc versions, the error situation is the same, but no error messages can be found in logs)
- qgis on desktop: v 3.34.3
- docker-qgis on qfc: v 3.34.3
- qfield on android: v 3.1.9
The small test project was created without errors and transferred from the desktop to qfc using qgis and the qfc-extension.
When downloading the project from qfield, the following error appears in the qfc log (see below) and qfield shows ... finished with a failed status.
::<<<::8a3d940f-4edd-4a81-a40d-8e29a512a667 Start QGIS Application
00:23:18.519 root INFO Starting QGIS app version 33403 (exported)...
00:23:19.431 root INFO QGIS app started!
::>>>::8a3d940f-4edd-4a81-a40d-8e29a512a667 2
::<<<::79dcaa92-90b8-4dcb-9a5b-8d11dbf6b9c7 Download Project Directory
00:23:19.431 root INFO Preparing a temporary directory for project files…
00:23:19.763 root INFO Downloading project files…
00:23:20.405 /usr/local/lib/python3.10/dist-packages/qfieldcloud_sdk/sdk.py INFO Downloading file "Luftbild RLP.tif"…
00:23:21.984 /usr/local/lib/python3.10/dist-packages/qfieldcloud_sdk/sdk.py INFO Downloading file "nocheintest.qgs"…
00:23:22.383 /usr/local/lib/python3.10/dist-packages/qfieldcloud_sdk/sdk.py INFO Downloading file "nocheintest_attachments.zip"…
00:23:22.836 /usr/local/lib/python3.10/dist-packages/qfieldcloud_sdk/sdk.py INFO Downloading file "testproject.gpkg"…
00:23:22.837 root INFO Downloading project files finished!
00:23:22.838 root INFO Getting project files list…
00:23:23.057 root INFO Local files list for project "fe553773-36e4-4fd1-8c39-8bf96b80c710":
Name Size MD5 Checksum
--------------------------- -------- --------------------------------
Luftbild RLP.tif 92571576 51d841f770d865e3e60b2fbc57721775
nocheintest.qgs 65709 678104f8df94fe20ae9d59bedeec0d8d
nocheintest_attachments.zip 1125 6eb2551519840b99c3e2a9ad6511faef
testproject.gpkg 98304 b5fff914b8329e2f5820f61a5f4c5d37
::>>>::79dcaa92-90b8-4dcb-9a5b-8d11dbf6b9c7 2
::<<<::a6cdab18-a37c-4d73-8183-a8b6d9abb151 QGIS Layers Data
00:23:23.058 root INFO Extracting QGIS project layer data…
Warning 1: RowsPerStrip not defined ... assuming all one strip.
00:23:23.220 QGSMSGLOG INFO Layer "testproject" will use attribute "fid" as a primary key.
00:23:23.220 libqfieldsync INFO Layer "testproject" will use attribute "fid" as a primary key.
00:23:23.222 root INFO QGIS project layer data
Layer Name Layer Id Is Valid Status Error Summary Provider Summary
------------ ---------- ---------- -------- --------------- ------------------
Luftbild RLP ...00f88c True no_error
testproject ...3c5aa8 True no_error
::>>>::a6cdab18-a37c-4d73-8183-a8b6d9abb151 2
::<<<::4596349c-1f5f-4d76-b133-8b0af12c946c Package Project
00:23:23.222 root INFO Preparing QGIS project for packaging…
Warning 1: RowsPerStrip not defined ... assuming all one strip.
00:23:23.344 root INFO Getting project area of interest…
00:23:23.348 root INFO Project area of interest is `POLYGON((6.22592366105867967 48.79753899646756565, 8.45619895145427591 48.79753899646756565, 8.45619895145427591 50.89221388272962088, 6.22592366105867967 50.89221388272962088, 6.22592366105867967 48.79753899646756565))` in `<QgsCoordinateReferenceSystem: EPSG:4326>` CRS.
00:23:23.349 root INFO Packaging…
Warning 1: RowsPerStrip not defined ... assuming all one strip.
Warning 1: RowsPerStrip not defined ... assuming all one strip.
Warning 1: RowsPerStrip not defined ... assuming all one strip.
00:23:23.699 QGSMSGLOG INFO Layer "testproject" will use attribute "fid" as a primary key.
00:23:23.698 libqfieldsync INFO Layer "testproject" will use attribute "fid" as a primary key.
00:23:23.699 QGSMSGLOG INFO Layer "testproject" will use attribute "fid" as a primary key.
00:23:23.699 libqfieldsync INFO Layer "testproject" will use attribute "fid" as a primary key.
Warning 1: RowsPerStrip not defined ... assuming all one strip.
::>>>::4596349c-1f5f-4d76-b133-8b0af12c946c 1
00:23:23.940 QGSSTDERR WARNING QFSFileEngine::open: No file name specified
00:23:23.940 root INFO Stopping QGIS app…
Feedback pre:
{
"container_exit_code": 0,
"error": "'QgsOfflineEditing' object has no attribute 'convert_to_offline'",
"error_class": "AttributeError",
"error_origin": "container",
"error_stack": [
" File \"/usr/src/app/lib/qfieldcloud/qgis/utils.py\", line 552, in run_workflow\n return_values = step.method(**arguments)\n",
" File \"/usr/src/app/entrypoint.py\", line 127, in _call_qfieldsync_packager\n offline_converter.convert()\n",
" File \"/usr/src/app/lib/libqfieldsync/offline_converter.py\", line 137, in convert\n self._convert(project)\n",
" File \"/usr/src/app/lib/libqfieldsync/offline_converter.py\", line 287, in _convert\n is_success = self.offliner.convert_to_offline(\n"
],
"error_type": "UNKNOWN",
this is maybe why some offline layer in my project loaded with no features.
please check
qfieldcloud community project: "KRK-KKPR"
username: "ckpu-sitaro"
error layer: "Polaruang_Sitaro"
I am pretty sure this is due to version mismatch in libqfieldsync. Note that libqfieldsync has a new mechanism to install. It's no longer a submodule, but a pip installable from GitHub. You have to remove the submodule.
The QFieldCloud project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.