Skip to content

Indicate which sheet a ${} replacement error comes from #714

@lognaturel

Description

@lognaturel

Software and hardware versions

pyxform v2.0.3

Problem description

I started an instance expression with ${ (${instance('filename')/root/item). Naturally, that doesn't work so I got an error: There has been a problem trying to replace ${instance('filename')/root/itemwith the XPath to the survey element named 'instance('filename')/root/item'. There is no survey element with this name.

This was on the entities sheet so it took me a while to find. It's not the first time this has happened to me. It has also happened from the settings sheet because I sometimes write an instance_name expression and then change the form structure without updating that expression.

Steps to reproduce the problem

Include a badly-formed ${} expression on the entities or settings sheet.

Expected behavior

There's an indication of the sheet the error is coming from.

Other information

Things you tried, stack traces, related issues, suggestions on how to fix it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    ${} referencesRelated to pyxform reference variables

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions