0

I have a LibreOffice Calc workbook with three worksheets. I'm trying to import data from the third worksheet. I've tried both the readODS and rio packages, but they keep returning the same error message:

Error: .onLoad failed in loadNamespace() for cli; details: call: fun(libname, pkgname) error: object 'clic_start_thread' not found

The readODS package's get_num_sheets_in_ods and list_ods_sheets functions work as expected. But its read_ods command throws the error above.

In particular, read_ods(path = "data/myFile.ods", sheet="Foobar", skip=2, range= "A3:E184") throws the error message above.

OTOH, the rio package's convert and import commands, without anything fancy, also throw the error message reproduced above.

I suspect the CLI package is being used to parse commands in both packages, but I'm at a loss for how these two packages seem to be choking on the neighborhoods. How should I debug these error messages?

zx8754
  • 52,746
  • 12
  • 114
  • 209
Gnosos
  • 47
  • 6
  • I know you said you didn't get the package `readODS` to work but read this [question and answer](https://stackoverflow.com/questions/61542069/importing-all-sheet-of-a-ods-file-in-r-keeping-the-name-of-the-sheets). It's not the same question, but it should help. – Kat Aug 13 '21 at 03:34
  • Thanks so much, Kat. To debug my problem, I first tried to replicate duckmayr's example. Everything worked until the mylist assignment, then I got the same error message as before! – Gnosos Aug 13 '21 at 18:46

1 Answers1

0

Kat,

Your hint led me to the solution! Thank you, thank you, thank you!!!

After I failed to replicate duckmayr's example, I realized the problem was my configuration. I searched the web for ".onLoad failed in loadNamespace() for 'cli' clic." While I didn't come up with anything specifically for the cli package, I came across several cases in which the solution was to reinstall or reconfigure the offending package.

So, I tried running install.packages("cli"), and this fixed the problem.

Funny how knowing what the solution is not can lead to understanding what the solution is.

Gnosos
  • 47
  • 6