2

I am a self-professed QGIS/QField newbie with no formal training, just what I've cobbled together from working on previous assignments with people far more astute than I. Once a year, I update QGIS, boot up the program, and create a new project for a couple of months of data collection. I use QField to export/import/sync my project between two tablets used for data collection in the field.

This year, for the first time, I'm getting this error:

"Python error: An error has occurred while executing Python code: See message log (Python Error) for more details"

I've gone so far as to look at the Python script in Notepad, but have no idea what I'm looking for or even what the issue is. I'm wondering if it's just an issue with the latest plugin version? One other user on SubStack also had Python errors when trying to export a project for QField, but apparently didn't get a solution to this issue.

What can I do?

The Traceback:

File "C:\Users/Zephyr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qfieldsync\gui\package_dialog.py", line 152, in package_project
              offline_convertor = OfflineConverter(
  File "C:\Users/Zephyr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qfieldsync\libqfieldsync\offline_converter.py", line 118, in __init__
              assert self.area_of_interest_crs.isValid()
AssertionError
3
  • What is your CRS? Apr 16, 2023 at 14:12
  • 1
    @bugmenot123 - I did not at all connect the crs.isValid to, you know, the CRS, so I'm so so glad you asked! It turns out it was set to some custom system, and when I selected an equivalent one from the drop-down menu, I could successfully export the project. Thank you!! Apr 16, 2023 at 15:51
  • Excellent! Maybe you could post the solution as an answer and self-accept it? Apr 16, 2023 at 18:19

1 Answer 1

1

Per @bugmenot123's suggestion, I took a look at the CRS (coordinate reference system) - the traceback hinted this might be an issue, given the line "eslf.area_of_interest_crs.isValid()". The CRS I had was a custom one, created a couple of years ago when a colleague helped me set up the project. For whatever reason, it was no longer compatible, and so I swapped to an equivalent CRS available from QGIS's drop-down menu. Once I did that, I could successfully export the project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.