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

Error in fetch(key) : lazy-load database '�' is corrupt #419

Closed
lucacerone opened this issue Jan 27, 2014 · 7 comments · Fixed by #1001
Closed

Error in fetch(key) : lazy-load database '�' is corrupt #419

lucacerone opened this issue Jan 27, 2014 · 7 comments · Fixed by #1001

Comments

@lucacerone
Copy link

The documentation is not reloaded properly when changes are made.

For example:

library(devtools)
dev_mode()
document("mypackage")
install("mypackage")
?some_function # shows the documentation correctly

# I keep working and make modifications to the documentation of "some_function".
# I want to update the documentation and the package so I issue:

detach("package:mypackage", unload = TRUE)
document("mypackage")
install("mypackage")
?some_function

Now the documentation shows

"Error in fetch(key) : lazy-load database '�' is corrupt"

However if I restart my R session the documentation is visualized correctly.

@hadley
Copy link
Member

hadley commented Jan 27, 2014

Unfortunately this is a base R problem. We've reported it, but R core is not interested in fixing it.

@hadley hadley closed this as completed Jan 27, 2014
@kendonB
Copy link

kendonB commented Apr 15, 2015

If anyone cares, I also have this problem.

@WilliamKinaan
Copy link

This problem is making me crazy, yet no solution

@hadley
Copy link
Member

hadley commented May 25, 2015

Either just use load_all() or use Build & Reload (in Rstudio, other IDEs may have something similar)

jimhester added a commit to jimhester/devtools that referenced this issue Dec 23, 2015
This is a workaround for a bug in base R. unloadNamespace does not
unregister any S3 methods, so the promises are invalid if you install a
new version of a package, try to unload and re-load the package.

See https://stat.ethz.ch/pipermail/r-devel/2015-December/072150.html for
more details and a reproducible example.

This fixes the common lazy-load errors people often run into when trying
to use devtools' install functions.

Fixes r-lib#419, r-lib#503, r-lib#942, r-lib#631
hadley added a commit that referenced this issue Dec 24, 2015
Unregister S3 methods explicitly.

Fixes #419, #503, #942, #631
@danielecook
Copy link

I get this error message constantly - any idea why this is happening so I can try to avoid it?

@jimhester
Copy link
Member

@danielecook Are you using the latest version of devtools? Can you provide your devtools::session_info(). Also in order to figure out the cause you need to provide the full error message including traceback.

@lock
Copy link

lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants