roam-qgis / Roam

Simple data collection built using QGIS.
http://roam-docs.readthedocs.org/en/latest/
GNU General Public License v2.0
166 stars 60 forks source link

Config Manager error on exiting with Capture value from field #410

Open TonyFMCMC opened 6 years ago

TonyFMCMC commented 6 years ago

I am trying to set up a simple Capture value from field. When I re-open config manager, the Capture layer has defaulted back to another table (when I saved it and closed, the Capture Layer was 'sites') see image below. Saving and closing generated two identical errors in C:\IntraMaps Roam\Roam Config Manager.exe.log as follows: Traceback (most recent call last): File "configmanager\ui\layerwidgets.pyc", line 764, in _save_current_widget File "configmanager\ui\layerwidgets.pyc", line 771, in _save_widget File "configmanager\ui\layerwidgets.pyc", line 802, in _get_widget_config File "configmanager\ui\layerwidgets.pyc", line 783, in _get_default_config AttributeError: 'NoneType' object has no attribute 'name' Although the sites table does have a field called 'name'.

image image

I think there are two separate problems here; I think maybe the display of 'EREmployees' instead of 'sites' is just a display issue, and then there is that it is finding a NoneType object.

Although the EREmployees table is not a geographic table, just data.

Windows 8.1, QGIS 2.18, Roam2.6. Data format is MSSQL.

TonyFMCMC commented 6 years ago

Despite this error in Config Manager, it seems that the value is being successfully captured in Roam.

bzeeb commented 6 years ago

Suspect it is some issue with direct MSSQL connections and versioning between QGIS 2.18 and 2.16 (loaded in Roam).

Will investigate, we haven't tested live database layers extensively.

TonyFMCMC commented 6 years ago

This does appear to be a problem in config manager, failing to populate the field dropdown from the value in the form.config file, which has the correct value (sites) under the default:layer entry.

- _id: c89ace67-f35e-48ba-befc-368435ad37a9
  config: {}
  default:
    expression: intersects($geometry, buffer($roamgeometry,5) )
    field: name
    layer: sites
    type: layer-value
  default_events:
  - capture
  - save
  field: site
  hidden: false
  name: Site
  read-only-rules:
  - editing
  rememberlastvalue: false
  required: false
  widget: Text
TonyFMCMC commented 6 years ago

Oops didn't mean to close the issue