Opened 8 months ago

Last modified 7 months ago

#30351 new defect

Unknown error in prepare_* functions using the spread() function

Reported by: karsten Owned by: metrics-team
Priority: High Milestone:
Component: Metrics/Website Version:
Severity: Normal Keywords:
Cc: metrics-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This morning we received a report that some of the graphs are not working anymore.

Turns out that nine graphs were affected by this issue, all of which using the spread() function internally. Here's the error message when plotting one of these graphs:

Error in get("as_data_frame.matrix", asNamespace("tibble"), mode = "function") :
  object 'as_data_frame.matrix' of mode 'function' was not found
Calls: plot_webstats_tm ... NextMethod -> -> as_data_frame_matrix -> get

I came up with a hotfix that replaces spread() with cast(), but that's going backwards from the tidyr package to its predecessor, the reshape package.

Also, I didn't find a working fix for the Tor Messenger graph where cast() works slightly different than spread() with regard to missing data.

We'll need to find a better fix. Ideally, we'd find out why spread() isn't working anymore, including why it stopped working in the first place.

Child Tickets

Change History (2)

comment:1 Changed 8 months ago by karsten

I tweaked the hotfix to also work for Tor Messenger (by using the reshape2 package rather than reshape):

This is currently running on the server but not merged to master. Ideally, we'd find a better fix!

comment:2 Changed 7 months ago by karsten

I just pushed this hotfix to master, because I was about to make another, unrelated hotfix. We should still find a better fix for this issue, which is why I'm leaving this ticket open.

Note: See TracTickets for help on using tickets.