worldbank/iefieldkit

iecodebook: "survey" causes uninformative error

Closed this issue · 0 comments

If used repeatedly, iecodebook tries to overwrite the survey label and redefine the survey variable. This causes an uninformative error and stops execution. This will also happen if these variables already exist in any dataset. This behavior can be resolved with the generate() option but this is not apparent from the error and is clunky to resolve after encountering as written.

Suggested fix:

  • Remove generate() from template subcommand
  • Have generate() overwrite the survey name later
  • Give meaningful error if generate() not specified and survey exists in data as var or lab