Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules Usage Report #162

Open
jweiss3034 opened this issue Sep 18, 2024 · 0 comments
Open

Rules Usage Report #162

jweiss3034 opened this issue Sep 18, 2024 · 0 comments

Comments

@jweiss3034
Copy link

We have found that if the csv file is generated on windows and has line endings end in \r\n that we receive the following error message

[error] s.RulesUsageService - Could not load rule usage statistics smui | java.lang.IllegalArgumentException: Mapping for SMUI_GUID not found, expected one of [SMUI_GUID, USER_QUERY, FREQUENCY] smui | at org.apache.commons.csv.CSVRecord.get(CSVRecord.java:121) smui | at services.RulesUsageService.$anonfun$getRulesUsageStatistics$3(RulesUsageService.scala:28) smui | at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100) smui | at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87) smui | at scala.collection.convert.JavaCollectionWrappers$JIterableWrapper.map(JavaCollectionWrappers.scala:83) smui | at services.RulesUsageService.$anonfun$getRulesUsageStatistics$1(RulesUsageService.scala:26) smui | at scala.Option.map(Option.scala:242) smui | at services.RulesUsageService.getRulesUsageStatistics(RulesUsageService.scala:21) smui | at controllers.ApiController.$anonfun$getRulesUsageReport$1(ApiController.scala:673) smui | at play.api.mvc.ActionBuilder.$anonfun$apply$13(Action.scala:376)

This does not occur if the csv file is generated on a non-windows machine and the line endings end in \n

I have attached a sample file generated on windows to this issue
stats-on-rules-usage.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant